Hello.
I posted this in a VBA forum, but received no response, i know this is not directly applicable to Access, but the users in this forum are AWESOME and very knowledgeable so i fugured I would see if someone could help me.
I am trying to publish an Excel Pivot Chart, but keep getting Run Time Error 1004 - Application-defined or object-defined error. Any help is GREATLY appreciated.
I have tried the code 2 ways:
I posted this in a VBA forum, but received no response, i know this is not directly applicable to Access, but the users in this forum are AWESOME and very knowledgeable so i fugured I would see if someone could help me.
I am trying to publish an Excel Pivot Chart, but keep getting Run Time Error 1004 - Application-defined or object-defined error. Any help is GREATLY appreciated.
I have tried the code 2 ways:
Code:
Sub PublishChart() Worksheets("Historical_Pivot").Activate
With ActiveWorkbook.PublishObjects.Add(xlSourceChart, _
Path & "\" & "AWA" & "_" & "JAMALCO" & "_" & "Chart" & ".htm", _
"Historical_Pivot", "JAMALCO", xlHtmlStatic, "ABC REQ BACKLOG_2013", "")
.Publish (True)
.AutoRepublish = False
End With
End Sub
Code:
Sub PublishChart()
Dim wb As Workbook
Dim ws As Worksheet
Set wb = ThisWorkbookSet ws = wb.Sheets("Historical_Pivot")
ws.ChartObjects("JAMALCO").Activate
With wb.PublishObjects.Add(xlSourceChart, Path & "\" & "AWA" & "_" & "JAMALCO" & "_" & "Chart" & ".htm", ws _
, "", xlHtmlStatic, "", "")
.Publish (True)
End With
End Sub
Last edited: