PDA

View Full Version : how to export the data into .excel in VBA



bittu2016
12-01-2016, 06:08 PM
Hi ,
I am new to VBA , I want to export the data to a excel file .
Ex ; I have an excel tool connected with database having customer inventory details , In the tool there are several options like 'Update', 'Insert' 'Print' etc ,I have the updated information in "print" module , but when I click on the 'print ' the invoices are getting printed, now I want to save the invoice data and export to .csv file at the same time on clicking the Print button.

Any help ?

Thanks
Bittu

Kenneth Hobs
12-02-2016, 07:58 AM
Welcome to the forum!

I don't know what the Excel "tool" is. So, I don't know how to modify it.

Normally, one just saves a file or sheet to a CSV file. So, you will need a means to query your data to create a sheet of the pertinent data. Of course if you can do that, it can be easily just sent to another database format like CSV. ADO is one way to query data.