• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 954
  • Last Modified:

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
0
kgerb
Asked:
kgerb
  • 2
1 Solution
 
StephenJRCommented:
I'm sure there must be a better way, but you could set the radius to zero.
0
 
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
 
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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now