Before, i had an excel spreadsheet that could export data to notepad and transferted data in a text file using VBA.
Now that i use VB6 and a MsFlexgrid to do the job, i want to transfert the vba Script to my VB6 project. That his to transfer the data from the MsFlexgrid to a text file using the same parameters.
vFieldArray = Array(1, 1, 12, 6)
But i need help on that.
Could you help me please?
In my msflexgrid, i have columns.
Column 1 = H = (1 space total)
Column 2 = A = (1 space total)
Column3 = Test = (12 space total)
Column 4 = John = (6 space total)
When it transfer the data to the txt file, il will transfert on the same line the information like that:
HATest________John__ .
Exemple:
Between the T from Test and J from John, there's 12 space. etc.
This his my code:
Dim intRow As Integer, intCol As Integer Dim i As Long, j As Long Dim f As Integer For i = 1 To intRow For j = 1 To intCol With MSFlexGrid1 f = FreeFile Open "C:\Users\Jean-Marc\Desktop\avyrex1926.Txt" For Output As f Print #f, (i - 1) & Space(1) Close f End With Next Next MsgBox "End"
Thanks for your help.
This post has been edited by wilder: 12 April 2009 - 01:03 PM

New Topic/Question
Reply



MultiQuote






|