Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

exporting to excel

Status
Not open for further replies.

Mack2

Instructor
Mar 12, 2003
336
US
I am able to export to excel. But does anyone know how to create a chart in excel progromatically through access. After the table is exported to excel, I want a chart to be created. I know how to do it within excel by using a macro, but I want the export and then the chart created automatically in excel. Thank you for your time
 
i dont know .. but it have something to go with an excel object.
//to initialise
Dim objXL As Object
Set objXL = CreateObject("Excel.Application")

//here there is somecode i was using to create from
//acess a "relation" graph in excel
//its imcomplete of course, but can give an hint
objXL.Application.Visible = True
objXL.Application.Workbooks.Open txtMacroPath
DoCmd.OutputTo acOutputReport, "TableFieldList", acFormatXLS, txtCheminTablesExcel, True
objXL.Application.Run "MACROTABLE.XLS!CreateTable"
objXL.ActiveWorkbook.Save 'As "C:\temp\CreateTable.xls", 39

//the finaly "destroy" the excel object
Set objXL = Nothing


hope this help
jb
 
Is that code grabbing the existing macro within the excel file that the person typed into the textbox?
 
Well all macro are in MACROTABLE.XLS.
Actualy this code doesn't build a chart
but reproduce an acess bd "relation graph"
into execl using textboxs,connectors,lines etc..

but if u whant to make a chart im pretty sure u have to look around:
Dim objXL As Object
Set objXL = CreateObject("Excel.Application")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top