Kaizer
05-18-2005, 06:36 AM
Hi guys,
below is the part of the code when I am taking the data from a sheet and save it as *.csv file.
'Export data
vFF = FreeFile
Open vSaveFile For Output As #vFF
Print #vFF, Sheets(2).Range("A1").Text 'line 1
Print #vFF, CStr(Month(Sheets(2).Range("A2"))) 'line 2
Print #vFF, CStr(Month(Sheets(2).Range("A2"))) 'line 3
Print #vFF, "Actual" 'line 4
For i = 0 To ExpCount - 2
Print #vFF, ExpAcct(i) 'lines 5 through second last account
Next i
Print #vFF, ExpAcct(ExpCount - 1); 'last account ends in ; to prevent extra line feed
Close #vFF
Now, I need to change it a little.
Sheets(2).Range("A1").Text in line 1 will be in Column A of my *.csv file. I need to add some value in line 1 that will be in Column B of my *.csv file. How to do it?
Thanks in advance.
below is the part of the code when I am taking the data from a sheet and save it as *.csv file.
'Export data
vFF = FreeFile
Open vSaveFile For Output As #vFF
Print #vFF, Sheets(2).Range("A1").Text 'line 1
Print #vFF, CStr(Month(Sheets(2).Range("A2"))) 'line 2
Print #vFF, CStr(Month(Sheets(2).Range("A2"))) 'line 3
Print #vFF, "Actual" 'line 4
For i = 0 To ExpCount - 2
Print #vFF, ExpAcct(i) 'lines 5 through second last account
Next i
Print #vFF, ExpAcct(ExpCount - 1); 'last account ends in ; to prevent extra line feed
Close #vFF
Now, I need to change it a little.
Sheets(2).Range("A1").Text in line 1 will be in Column A of my *.csv file. I need to add some value in line 1 that will be in Column B of my *.csv file. How to do it?
Thanks in advance.