Embedded Excel object in Powerpoint Axes

mooseman

Board Regular
Joined
Jul 23, 2004
Messages
195
I have many embedded objects in PowerPoint 2007 that contain a chart and a data sheet.
I need to dynamically change the label and tick mark spacing
This will run, but it doesn't change the values to 316 (I'll be using a variable later).
Do I need to activate the axes or the chart itself?
I have gotten this far, but one line seems to run, but not make the actual change to the axes. The line in red will not make any changes.
Any help would be great.
Thanks ahead of time


Dim oSh As Shape
Dim oSl As Slide
Dim oSheet As Object
Dim PPApp As PowerPoint.Application
Dim PPPres As PowerPoint.Presentation

For Each oSl In ActivePresentation.Slides
For Each oSh In oSl.Shapes

ActiveWindow.View.GotoSlide oSl.SlideIndex
If oSh.Type = msoEmbeddedOLEObject Then
If oSh.Name = "TwoLabelAxes" Then
oSh.OLEFormat.Activate
With oSh.OLEFormat.Object
dates = .Application.Workbooks(1).Worksheets(1).Range("D1").Value

.ActiveChart.Axes(xlCategory).TickMarkSpacing = dates

End With
End If

ActiveWindow.Selection.Unselect
ActiveWindow.View.GotoSlide oSl.SlideIndex

End If

Next


Next
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Forum statistics

Threads
1,225,611
Messages
6,185,996
Members
453,334
Latest member
Prakash Jha

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top