Exporting to excel (1 Viewer)

StephenD

Registered User.
Local time
Today, 11:49
Joined
Nov 23, 2001
Messages
38
Can you program Access to export a query into excel, then have excel create a graph on the newly exported data?
I'm a newbie to VBA and was wondering how complicated this would be?
I've read something about arrays, and also I'm aware of the transfer spreadsheet action but I'd like to go a step further and have excel automatically create a graph.

Thanks!
 

simongallop

Registered User.
Local time
Today, 11:49
Joined
Oct 17, 2000
Messages
611
Export query as an Excel workbook is easy. DoCmd.OutputTo acQuery, "Query_Name", "MicrosoftExcel(*.xls)", "Path and filename.xls"

If you then create a template file with the graph that references the data from the exported query, whenever new data is exported the graph will be looking at the new data. This is presuming that the format and number of rows will remain the same each time you export. If the data is of variable length then you will need to create code for the graph to read the data.

HTH
 

StephenD

Registered User.
Local time
Today, 11:49
Joined
Nov 23, 2001
Messages
38
Thanks Harry!

Does it export the data to a completly new sheet in the specified workbook or can you specify an existing sheet?

Also the format will remain the same with the same fields, however the number of rows will increase-would the code be written in Excel? How would I do this??

Thanks again
 

Users who are viewing this thread

Top Bottom