B
Brattex
Hi there
Apologies in advance if there's a more appropriate group for this, but
I figure "VBA and OFFICE" are valid enough for my query![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
I've got an EXCEL spreadsheet which I'm coding underneath with the VBA
stuff, and I need to find a way to export the current sheet's important
parameters into a CSV file. I've successfully got it to export to a NEW
CSV file each time through butchering some code I found on the internet
[see below], but how can I get it to ADD to a CSV file that already
exists? I'd rather APPEND data to an existing file,so I can have
fifteen spreadsheets all exported to the same CSV file for future
manipulation.
Also, not sure if there's a quicker way to store twelve variables' data
to a CSV file than the way I've hard-coded it, so if there is, that'd
be great. Maybe I need to create a array... [thinking to myself]...
Thanks
Bryan
DestFile = InputBox("Enter the destination filename" _
& Chr(10) & "(with complete path):", "Quote-Comma Exporter")
FileNum = FreeFile()
Open DestFile For Output As #FileNum
Print #FileNum, """" & "Owner" & """";
Print #FileNum, ",";
Print #FileNum, """" & "OwnerContactNo" & """";
Print #FileNum, ",";
Print #FileNum, """" & "Address" & """";
Print #FileNum, ",";
Print #FileNum, """" & "Make" & """";
Close #FileNum
Apologies in advance if there's a more appropriate group for this, but
I figure "VBA and OFFICE" are valid enough for my query
I've got an EXCEL spreadsheet which I'm coding underneath with the VBA
stuff, and I need to find a way to export the current sheet's important
parameters into a CSV file. I've successfully got it to export to a NEW
CSV file each time through butchering some code I found on the internet
[see below], but how can I get it to ADD to a CSV file that already
exists? I'd rather APPEND data to an existing file,so I can have
fifteen spreadsheets all exported to the same CSV file for future
manipulation.
Also, not sure if there's a quicker way to store twelve variables' data
to a CSV file than the way I've hard-coded it, so if there is, that'd
be great. Maybe I need to create a array... [thinking to myself]...
Thanks
Bryan
DestFile = InputBox("Enter the destination filename" _
& Chr(10) & "(with complete path):", "Quote-Comma Exporter")
FileNum = FreeFile()
Open DestFile For Output As #FileNum
Print #FileNum, """" & "Owner" & """";
Print #FileNum, ",";
Print #FileNum, """" & "OwnerContactNo" & """";
Print #FileNum, ",";
Print #FileNum, """" & "Address" & """";
Print #FileNum, ",";
Print #FileNum, """" & "Make" & """";
Close #FileNum