Hi all,
This is driving me mad... I've been searching the forum all morning, but can't find a solution.
I have an embedded (unbound object frame) Excel Chart (XY Scatter) and I'm trying to get it to update the displayed object after I have made changes to the underlying chart object. Here's my code:
Sub Test()
Dim pWorkbook As Excel.Workbook
Dim CHT As Excel.Chart
Forms![frm_Dashboard]![OLEScatterPlot].Action = acOLEUpdate
Set pWorkbook = Forms![frm_Dashboard]![OLEScatterPlot].Object
Set CHT = pWorkbook.Charts(1)
CHT.ChartTitle.Text = "New Text Goes Here"
pWorkbook.Save
Forms![frm_Dashboard]![OLEScatterPlot].Action = acOLEUpdate
Set pWorkbook = Nothing
End Sub
This used to be easy when Access had pivot charts... but alas.
I remember finding a fix for this years ago, but I can't remember how I did it. I've tried "Graph" but the output is hideous.
Any help would be greatly appreciated.
This is driving me mad... I've been searching the forum all morning, but can't find a solution.
I have an embedded (unbound object frame) Excel Chart (XY Scatter) and I'm trying to get it to update the displayed object after I have made changes to the underlying chart object. Here's my code:
Sub Test()
Dim pWorkbook As Excel.Workbook
Dim CHT As Excel.Chart
Forms![frm_Dashboard]![OLEScatterPlot].Action = acOLEUpdate
Set pWorkbook = Forms![frm_Dashboard]![OLEScatterPlot].Object
Set CHT = pWorkbook.Charts(1)
CHT.ChartTitle.Text = "New Text Goes Here"
pWorkbook.Save
Forms![frm_Dashboard]![OLEScatterPlot].Action = acOLEUpdate
Set pWorkbook = Nothing
End Sub
This used to be easy when Access had pivot charts... but alas.
I remember finding a fix for this years ago, but I can't remember how I did it. I've tried "Graph" but the output is hideous.
Any help would be greatly appreciated.