Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
label caption | Excel Discussion (Misc queries) | |||
Naming Auto Shapes and Creating new Shapes | Excel Discussion (Misc queries) | |||
When drawing shapes in excel the shapes keep disappearing | Excel Discussion (Misc queries) | |||
How can i get more 3D shapes for Auto shapes in excel? | Excel Discussion (Misc queries) | |||
How can i get more 3D shapes for Auto shapes in excel? | Excel Discussion (Misc queries) |