Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 230
Default Caption control on shapes

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


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,073
Default Caption control on shapes

On Apr 11, 8:53 am, "RobN" wrote:
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
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 230
Default Caption control on shapes

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

"Ken Johnson" wrote in message
...
On Apr 11, 8:53 am, "RobN" wrote:
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



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,489
Default Caption control on shapes

Hi,

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

Cheers
Andy

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"RobN" wrote in message
...
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

"Ken Johnson" wrote in message
...
On Apr 11, 8:53 am, "RobN" wrote:
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




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 230
Default Caption control on shapes

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

"Andy Pope" wrote in message
...
Hi,

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

Cheers
Andy

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"RobN" wrote in message
...
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

"Ken Johnson" wrote in message
...
On Apr 11, 8:53 am, "RobN" wrote:
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






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
label caption gramps Excel Discussion (Misc queries) 0 November 1st 07 03:56 PM
Naming Auto Shapes and Creating new Shapes AL2000 Excel Discussion (Misc queries) 3 September 10th 07 04:12 AM
When drawing shapes in excel the shapes keep disappearing Tape Excel Discussion (Misc queries) 1 October 6th 06 04:23 PM
How can i get more 3D shapes for Auto shapes in excel? Ajey Excel Discussion (Misc queries) 0 March 3rd 05 09:53 AM
How can i get more 3D shapes for Auto shapes in excel? Ajey Excel Discussion (Misc queries) 0 March 3rd 05 09:53 AM


All times are GMT +1. The time now is 12:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"