Remove 3d formatting from a chart object. 2 lines of recorded code (below) don't work

VBAProIWish

Well-known Member
Joined
Jul 6, 2009
Messages
1,027
Office Version
  1. 365
Platform
  1. Windows
Hello All,

Despite 2+ hours of searching all over the place, I have not been able to find any code that will simply remove a bevel in the chart.
The recorded code (below) shows exactly what I did, but if I manually put the chart back to 3d and try the recorded code, it does nothing.
Soooo confused by this and even more confused that no one else has asked this same question.

Thanks so much for anything anyone can do

VBA Code:
Sub RemoveThreeD
    
    ActiveSheet.ChartObjects("Chart 1").Activate
    ActiveSheet.Shapes("Chart 1").ThreeD.BevelTopType = msoBevelNone
    
End Sub
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
What about something like this?

VBA Code:
Sub RemoveThreeD()
    Dim I As Integer
    
    With ActiveSheet.ChartObjects("Chart 1").Chart
        For I = 1 To .FullSeriesCollection.Count
            .FullSeriesCollection(I).Format.ThreeD.BevelTopType = msoBevelNone
        Next I
    End With
End Sub
 
Upvote 0
Hello rlv01, thanks but it didn't work.

This seems to be an impossible thing to do via code. So easy to do manually, but yet, it doesn't seem to be "codable".

Anyone else have any suggestions?
 
Upvote 0
VBA Code:
Sub RemoveThreeD
   
    ActiveSheet.ChartObjects("Chart 1").Activate
    ActiveSheet.Shapes("Chart 1").ThreeD.BevelTopType = msoBevelNone
   
End Sub

The above code does not work for me under O365 or Excel 2010.

This:
VBA Code:
 ActiveSheet.Shapes("Chart 1").Select
 Selection.Format.ThreeD.BevelTopType = msoBevelNone

Works under Excel 2010, but not under Excel 2016/O365
 
Upvote 0
rlv01, That is interesting and thank you for that information.

Does anyone know a way around this via code or is it safe to say that removing the bevel from a shape via code is simply not possible in Excel 365?f

Thanks rlv01 and anyone else who can give this a whirl!
 
Upvote 0
Bumping this one last time in hope of someone knowing of a solution.
Fingers crossed! :)
 
Upvote 0

Forum statistics

Threads
1,214,944
Messages
6,122,391
Members
449,080
Latest member
Armadillos

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