Hello all & festive greetings to all,
Goal: I am trying to put two arrow buttons with a 3D chart (3D area chart) that will rotate the chart left and right.
Issue:I understand that in Excel 2007 recording macros only goes so far, and cannot help in this instance.
The problem i am having is that i cannot record macros and I am not a vba user.
I can easily adjust the view by right clicking on the chart and using the 3D options, but that is not an optimum solution.
I tried adding the 3D button to the ribbon and record a macro to it that way, but that didn't work.
Advanced thankyou: I'd be really grateful if anyone could provide a solution (or a link to a working example) that I could use.
Kind Regards,
GM
(boing!)
Last edited by Guru Meditation; 12-23-2011 at 07:44 AM.
The example file has 4 shapes using this macro.
Sub RotateChart() Dim chtTemp As Chart Set chtTemp = ActiveSheet.Shapes("Chart 1").Chart Select Case UCase(Application.Caller) Case "RIGHT ARROW 4" chtTemp.PlotArea.Format.ThreeD.RotationX = chtTemp.PlotArea.Format.ThreeD.RotationX - 1 Case "RIGHT ARROW 2" chtTemp.PlotArea.Format.ThreeD.RotationX = chtTemp.PlotArea.Format.ThreeD.RotationX + 1 Case "RIGHT ARROW 3" chtTemp.PlotArea.Format.ThreeD.RotationY = chtTemp.PlotArea.Format.ThreeD.RotationY - 1 Case "RIGHT ARROW 5" chtTemp.PlotArea.Format.ThreeD.RotationY = chtTemp.PlotArea.Format.ThreeD.RotationY + 1 End Select End Sub
thanks so much Andy! I'll give it a try - VERY much appreciated!
G M
(boing!)
Hi,
(and happy new year everyone)
I tried using your macro code, but no luck I'm afraid - I can see what it's supposed to do, but i wasn't able to create
a 3D chart with buttons that worked to rotate the view despite all your kind help.
I'm just wondering if you or your colleagues might be able to point me in the direction of a complete example that I can copy/paste/tweak as necessary?
Apologies in advance if I've missed the blooming obvious...
Kind Regards,
G M
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks