[RESOLVED] command button to save your textboxs value
hii everybody
i want ask you about my form that contain 3 textboxs with one command button so i want to make this commandbutton to save what is in the textbox as *txt files for next use
please help and give me if it 's possible the function or code ,okey!
--------------------
your brother milen thx a lot guys
regard's
Re: command button to save your textboxs value
Have you researched on the Open statement, Print statement, and Input statement?
Re: command button to save your textboxs value
what means open statment where can i fond him??????
:confused:
Re: command button to save your textboxs value
Re: command button to save your textboxs value
here is more specifically what u need
this is assuming the textboxes have 1 line in each.. if multiline then let me know
you could do that a few different ways
VB Code:
Private Sub Command1_Click()
Open App.Path & "\data.txt" For Output As #1
Print #1, Text1
Print #1, Text2
Print #1, Text3
Close #1
End Sub
Private Sub Form_Load()
Dim tmp As String
If Len(Dir(App.Path & "\data.txt")) <> 0 Then
Open App.Path & "\data.txt" For Input As #1
Line Input #1, tmp
Text1 = tmp
Line Input #1, tmp
Text2 = tmp
Line Input #1, tmp
Text3 = tmp
Close #1
End If
End Sub
Re: command button to save your textboxs value
theank you guys it's work
spicilly static thx a lot
milen
regard's :wave:
Re: command button to save your textboxs value
When you have received an answer to your question, please mark it as Resolved using the Thread Tools menu.http://www.vbforums.com/images/ieimages/2004/12/1.gif