Click here to Skip to main content
15,889,896 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I already build the datagrid in vb6. Now my problem is i don't know how to save the data in datagrid into the textfile. Anyone can help me? Thanks.
Posted
Comments
Christian Graus 27-Aug-10 3:09am    
VB6 is obsolete. Why not learn a modern language ?
hykiat 27-Aug-10 3:34am    
because i had been ask to use vb6. So i really need help from you all.
Christian Graus 27-Aug-10 3:44am    
Well, VB6 is crap, why would anyone ask you to use it ? Either way, I've never used it ( refer: it's crap ) and because it's obsolete, you'll find it hard to find help for it.
casio5678 19-Feb-11 6:00am    
Thats true.To days .net is tomorrows crap.
Goutam Patra 27-Aug-10 3:54am    
In which part do you want help? Loop through the grid or saving it into text file?

Saving into text file will be like this


'Open the File with a handler #1

Open "c:\xx.txt" for output as #1

Do  While ...
  ''' ......
  '''' Create your line to be printed strLine
  'Write a single line
  Print #1, strLine
  ''''' ...
Loop

'Close the file

Close #1


Now try yourself. I havent use these codes a long time.
 
Share this answer
 
You may find several tutorials and samples on the net. See for instance here[^].
:)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900