Caption control on shapes

  • Thread starter Thread starter RobN
  • Start date Start date
R

RobN

Is there any control, through VBA or other, over the text/caption for
shapes?

ie similarly to what the CommandButton1.Caption = "xxx" and
CommandButton1.BackColor = &HFF00& do.

Rob
 
Is there any control, through VBA or other, over the text/caption for
shapes?

ie similarly to what the CommandButton1.Caption = "xxx" and
CommandButton1.BackColor = &HFF00& do.

Rob

If the Shape is one that can show text (has a Textframe) then...

With ActiveSheet.Shapes("Oval 1")
.TextFrame.Characters.Text = "xxx"
.TextFrame.Characters(2, 1).Font.Bold = True 'makes 2nd x bold
(Start = 2, Length =1)
.Fill.ForeColor.RGB = RGB(255, 255, 0) 'adds a yellow fill
'.Fill.ForeColor.SchemeColor = 13 'another way of adding the
yellow fill
End With

Ken Johnson
 
Thanks Ken,

But I can't seem to find the name of the shape anywhere in properties, etc.
It certainly contains text, but I presume I need to call it the exact name
within the VBA code.

Any ideas?

Rob
 
Hi,

When you select the shape it's name should appear in the Name Box, next to
the formula bar.

Cheers
Andy
 
Thanks Andy,

I did know that.....or so I thought! What was showing was "Snip Same Side
Corn...", so I thought it wasn't showing the name at all, but when I clicked
into the Name Box it revealed the full name, "Snip Same Side Corner
Rectangle 2".

Rob
 

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

Back
Top