Changing the Caption on a Worksheet Label

Joined
May 18, 2006
Messages
6
Reaction score
0
All of my books don't seem to address this issue. I have a map of the US that display's that I have added fifty labels to which display the percentage contained of each part of our portfolio. I have a table that links the label name to each state. I can't find the proper object to reference the caption value in order to have it automatically update when the table percentage value updates. Here's the code I was trying to use:

Activesheet.Shapes("Label" & Cells(S + X, Range("States").Column - 1).Value).Caption = Cells(S + X, Range("States").Column + 2).Value

I'm guessing that I shouldn't be using the Shapes object in this case? I can access many of the properties of "LabelX" with .Shapes but not the caption value. Thanks for your help!
 
Joined
May 18, 2006
Messages
6
Reaction score
0
I reposted this topic in Programming.. but here's the progress I made anyway.. Please reply in the programming subforum.

Ok, so through the object browser/Debugging I know that I can directly reference the label object with Activesheet.label1 BUT, is there a way to dynamically access the label object?


So in other words, can I access it as Activesheet.Item("Label" & X) or something similar? I know Item isn't a member of the Worksheet object, but is there something there? Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top