Turn Off Shape Glow

Posted on 2011-10-05
Last Modified: 2012-05-12
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.

Question by:kgerb
    LVL 24

    Expert Comment

    I'm sure there must be a better way, but you could set the radius to zero.
    LVL 17

    Accepted Solution

    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.
    LVL 12

    Author Comment

    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.

    LVL 12

    Author Closing Comment

    Thanks for the help

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
    This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
    This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
    This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now