Turn Off Shape Glow

The following code will turn on the glow for a shape and set the color.
Sub Macro1()
Dim shp As Shape
Set shp = ActiveSheet.Shapes("Rounded Rectangle 2")
With shp.Glow
    .Radius = 18
    .Color.ObjectThemeColor = msoThemeColorAccent1
End With
End Sub

Open in new window

Now, my question is, how do I turn it off.  I have tried
.Color.ObjectThemeColor = msoNotThemeColor

Open in new window

but I get a value out of range error.  Do I just set the radius to zero?  It "works" but seems cheesy.  Thanks for the help.

Kyle
LVL 12
kgerbChief EngineerAsked:
Who is Participating?
 
andrewssd3Commented:
No - I think that is what you have to do, cheesy or not!  If you look at a shape with no glow, you can get a GlowFormat object for it by saying
Dim shp As Shape
Dim g As GlowFormat

Set shp = ActiveSheet.Shapes("Rounded Rectangle 2")
Set g = shp.Glow

Open in new window

...and it just has a radius of 0 - so I think tat's the only way.  There is no Glow.Delete method or HasGlow property to set.
0
 
StephenJRCommented:
I'm sure there must be a better way, but you could set the radius to zero.
0
 
kgerbChief EngineerAuthor Commented:
andrewssd3,
Thanks, I hadn't thought of making a new shape and then testing the radius property.  I think you're right but I want to leave this open for a few more minutes in case someone comes up with something different.

Kyle
0
 
kgerbChief EngineerAuthor Commented:
Thanks for the help
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.