VBA- how to retrieve a color in a colortheme

E

Edward

Hi everybody,
I have several customized colortheme in PP2007 , I need to retrieve Accent1
color and apply to the backcolor of a lable in a user form.
lblMyLable.BackColor=…
I can't find a way of doing this ...
for a shape in a slide it's easy for example for a cell in a table I use the
following code

..Cell(1, 1).Shape.Fill.ForeColor.ObjectThemeColor=msoThemeColorAccent1

but I don't know how to apply accent1 or retrieve it's color and apply to a
lable in a userform
Any suggestion greatly appreciated
 
E

Edward

Thanks Steve,
This method is only working for shapes on a slide .
What I'm trying to do is to write some code to change the backcolor of a
lable in a userform-Initialize() event.
I used

Private Sub UserForm_Initialize()
Dim shp
set shp=Me.lbl1Header
shp.Fill.ForeColor.ObjectThemeColor=msoThemeColorAccent1
and it generates an error
End Sub

Any suggestions
 

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