Connecting Tech Pros Worldwide Forums | Help | Site Map

text help in Vb6.0

yoda's Avatar
Needs Regular Fix
 
Join Date: Dec 2006
Location: canada
Posts: 273
#1: Jan 12 '07
how to save the txt in the txt box in the form to a txt file on to a hard drive

Example with a txt login boxs how to save the txt in them to a txt file on a hard
drive

iburyak's Avatar
Expert
 
Join Date: Nov 2006
Posts: 1,017
#2: Jan 12 '07

re: text help in Vb6.0


Put a text box and a button on your form.
Put this code in a click event of the button.

Dim FH As Long
FH = FreeFile()

Open "C:\aaa.txt" For Append As #FH
Print #FH, Text1.Text
Close #FH
yoda's Avatar
Needs Regular Fix
 
Join Date: Dec 2006
Location: canada
Posts: 273
#3: Jan 13 '07

re: text help in Vb6.0


thanks for the code i will see if it works will get back

Yoda Canada Eh
Reply