tgoglia
asked on
Populating Excel Ole With ADO Recordset
I have opened an excel worksheet object in my VB application and am attempting to populate it from an ADO recordset, and allow the user to print out the results. What is the method to import the data into the excel chart? When I run the application, all of the usual Excel menu items are there excepr for the File menu, which includes the Print command. How do I allow the user to print the date in the chart after they have formatted it?
ASKER
Thanks for your help. Your code proved that I had the right idea, the problem was that I thought that when I created the OLE object, I assumed that the appropriate code libraries would automatically be added to the project. An incorrect assumption.
tgoglia
tgoglia
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
' Here's how you plug in the ADO recordset value
objExcel.Application.Activ
If your chart is based on a pivot table which gets its data from "Sheet1", it will automatically appear in the chart.