|
-
Mar 22nd, 2006, 08:30 AM
#1
Thread Starter
Hyperactive Member
Atypical write to file? – look here
Welcome
Me again, small question.
Is this possible? some way is to save in 1 textfile from 3,4 different objects, but in such the way that i can easily and the correctly text load to every with the objects
Or maybe it load them before the call this form?
Thx in advance
I know, I know, my English is bad, sorry .....
-
Mar 22nd, 2006, 08:38 AM
#2
Re: Atypical write to file? – look here
I'm not understanding your question.
Are you asking how to save the contents of three different textboxes to the same text file?
-
Mar 22nd, 2006, 08:53 AM
#3
Thread Starter
Hyperactive Member
Re: Atypical write to file? – look here
Yes exactly, and also it can be e.g. from 2 TextBoxes and 1 ComboBox
I think so, that to sort thing in a file and to mark specified strings some the symbols......it is possible?
Last edited by Tamgovb; Mar 22nd, 2006 at 09:06 AM.
I know, I know, my English is bad, sorry .....
-
Mar 22nd, 2006, 01:29 PM
#4
Re: Atypical write to file? – look here
 Originally Posted by Tamgovb
Yes exactly, and also it can be e.g. from 2 TextBoxes and 1 ComboBox
VB Code:
Open "c:\tamgovb.txt" For Append As #1
Print #1, Text1.Text & vbNewLine
Print #1, Text2.Text & vbNewLine
Print #1, Combo1.List(Combo1.ListIndex)
Close #1
 Originally Posted by Tamgovb
I think so, that to sort thing in a file and to mark specified strings some the symbols......it is possible?
You lost me again. What is it that you want to do?
-
Mar 22nd, 2006, 02:35 PM
#5
Thread Starter
Hyperactive Member
Re: Atypical write to file? – look here
On moment I will return to your solution. You passed example, it will not be problem with load the data from this file to a textboxes and combobox?
What is it.... so, good questions. Hmm, you will not believe, only i wonder how to make to spare on my work with writing the code. Also with a practical causes - it's more quickly.
Only my knowledge, hmm.......damn (sorry), such poor is, i must get to know much.
back to the theme, or can ask you about some example code - save / read such banal example of code, leaning on this what you wrote already.
Hack, i will be grateful, thx
P.S. AAaaa - really I noticed now - you about it ask, I thought that it is complikated very and now this has not meaning
Last edited by Tamgovb; Mar 22nd, 2006 at 02:52 PM.
I know, I know, my English is bad, sorry .....
-
Mar 22nd, 2006, 03:25 PM
#6
Frenzied Member
Re: Atypical write to file? – look here
 Originally Posted by Hack
Are you asking how to save the contents of three different textboxes to the same text file?
VB Code:
Dim data() As String
'to save the data
Private Sub Command1_Click()
Open App.Path & "\data.txt" For Output As #1 'open file for output
Print #1, Text1.Text 'save text1's text
Print #1, Text2.Text 'save text2's text
Print #1, Text3.Text 'save text3's text
Close #1 'close file
End Sub
' to load the data
Private Sub Command2_Click()
Dim buffer As String
Open App.Path & "\data.txt" For Input As #1 ' open file for input
buffer = Input$(LOF(1), 1) 'load the whole file at once
Close #1 'close file
data = Split(buffer, vbNewLine) 'split the data at every new line
Text1.Text = data(0) 'text1's text is the splited data
Text2.Text = data(1) ' " "
Text3.Text = data(2) ' " "
End Sub
Last edited by wiz126; Mar 22nd, 2006 at 03:44 PM.
-
Mar 23rd, 2006, 06:52 AM
#7
Re: Atypical write to file? – look here
Where are you with this particular issue at the moment?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|