I've got a workbook called "Last eight periods chart". In this I have a pivot table linked to data in my mdb. I've gotten around the auto refresh dialog box by refreshing the workbook through code. However, now I need to print the chart to a pdf file. I cannot get anything to work. The chart is on a sheet labeled chart1, the pivot table is on sheet1. I need help. Thanks for any advice you can give me. here is the code that refreshes.
Dim xl As Excel.Application
Set xl = CreateObject("excel.Application")
xl.Workbooks.Open ("C:\last eight periods chart.xls") ' substitute your file here
xl.Visible = True
xl.DisplayAlerts = False
xl.ActiveWorkbook.RefreshAll
Dim xl As Excel.Application
Set xl = CreateObject("excel.Application")
xl.Workbooks.Open ("C:\last eight periods chart.xls") ' substitute your file here
xl.Visible = True
xl.DisplayAlerts = False
xl.ActiveWorkbook.RefreshAll