Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Modifying VBA Shapesheet Not Updating Shape

Modifying VBA Shapesheet Not Updating Shape

Modifying VBA Shapesheet Not Updating Shape


I'm attempting to change the foreground fill-color of various shapes via VBA code, as follows:

Visio.ActivePage.Shapes("Sheet.61").Cells("FillForegnd").Formula = "RGB(255,0,0)"

This works with some shapes but not with others. The funny thing is, after the code executes, the Shapesheet reflects the new value, and if I right-click the shape and select Format->Fill..., the dialog box will display the correct (new) fill color. However, the shape, itself, never changes color!

Has anyone seen this phenomenon before? Is it a bug in Visio, or am I supposed to refresh the drawing somehow? I tried saving the drawing and then closing & reopening, but the color doesn't change.


RE: Modifying VBA Shapesheet Not Updating Shape

Bah! I figured it out. Apparently some sheets are composed of more than one shape, so you have to do a For Each through the .Shapes collection to set each sub-shape's color individually.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close