• 0

[VB6] text file editing


Question

hi,

i recently started making a program to edit a text file so i can enhance or make a new dynamic signature (see below).

i have four buttons that i want to change the text in a text file. the problem is i cant open or create a file where i wanna put the text. i'm also stuck on the code that will append or whatever the text i want.

here:

Private Sub Command1_Click()
Load Gaming
Gaming.Show
End Sub

that loads a new form, but before it does, i want it to set some text in a text file i specify.

anyone know how?

sorry if i appear n00b-ish, but i've only just started to learn VB.

thanks in advance,

Prism128

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Before Gaming.Show, you have to put the text in your text box, i cant exactly remeber how (I'm hooked on.net, TextReader is so easy :wub: )

e.g.

Private Sub Command1_Click()

Load Gaming

'Load text from file

Gaming.Textbox1.Text = <Text from file here>

Gaming.Show

End Sub

If i can remember correctly, try OPEN <FileName> for INPUT as #1 or something, then READ #1 or something.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.