Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
changing a shape font to bold with VB
Hmmmm. There must be a trick to this one. The following code works just fine:
With ActiveSheet.Shapes("TB purchase n") .Fill.Visible = msoTrue End With but this does not work: With ActiveSheet.Shapes("TB purchase n") .Font.Bold = True End With It seems when I'm working with a font I have to select the shape (which I'd rather not do). This works: ActiveSheet.Shapes.Range("TB purchase n").Select Selection.Font.Bold = True Could someonr throw some light on this for me please? Regards, Brett. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
changing a shape font to bold with VB
Try this
With ActiveSheet.Shapes("TB purchase n") .TextFrame.Characters.Font.Bold = True End With -- __________________________________ HTH Bob "Brettjg" wrote in message ... Hmmmm. There must be a trick to this one. The following code works just fine: With ActiveSheet.Shapes("TB purchase n") .Fill.Visible = msoTrue End With but this does not work: With ActiveSheet.Shapes("TB purchase n") .Font.Bold = True End With It seems when I'm working with a font I have to select the shape (which I'd rather not do). This works: ActiveSheet.Shapes.Range("TB purchase n").Select Selection.Font.Bold = True Could someonr throw some light on this for me please? Regards, Brett. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
changing a shape font to bold with VB
Thanks Bob, that works, but this doesn't:
With ActiveSheet.Shapes.Range(Array("TB purchase 1", "TB purchase 2", "TB purchase 3", "TB purchase")) .TextFrame.Characters.Font.Bold = False .Fill.Visible = msoFalse End With and I suspect that you can only use textframe with one shape. Is that right? "Bob Phillips" wrote: Try this With ActiveSheet.Shapes("TB purchase n") .TextFrame.Characters.Font.Bold = True End With -- __________________________________ HTH Bob "Brettjg" wrote in message ... Hmmmm. There must be a trick to this one. The following code works just fine: With ActiveSheet.Shapes("TB purchase n") .Fill.Visible = msoTrue End With but this does not work: With ActiveSheet.Shapes("TB purchase n") .Font.Bold = True End With It seems when I'm working with a font I have to select the shape (which I'd rather not do). This works: ActiveSheet.Shapes.Range("TB purchase n").Select Selection.Font.Bold = True Could someonr throw some light on this for me please? Regards, Brett. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
changing a shape font to bold with VB
Yes, just iterate the array.
-- __________________________________ HTH Bob "Brettjg" wrote in message ... Thanks Bob, that works, but this doesn't: With ActiveSheet.Shapes.Range(Array("TB purchase 1", "TB purchase 2", "TB purchase 3", "TB purchase")) .TextFrame.Characters.Font.Bold = False .Fill.Visible = msoFalse End With and I suspect that you can only use textframe with one shape. Is that right? "Bob Phillips" wrote: Try this With ActiveSheet.Shapes("TB purchase n") .TextFrame.Characters.Font.Bold = True End With -- __________________________________ HTH Bob "Brettjg" wrote in message ... Hmmmm. There must be a trick to this one. The following code works just fine: With ActiveSheet.Shapes("TB purchase n") .Fill.Visible = msoTrue End With but this does not work: With ActiveSheet.Shapes("TB purchase n") .Font.Bold = True End With It seems when I'm working with a font I have to select the shape (which I'd rather not do). This works: ActiveSheet.Shapes.Range("TB purchase n").Select Selection.Font.Bold = True Could someonr throw some light on this for me please? Regards, Brett. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Bold font if statement | Excel Worksheet Functions | |||
Bold Font question | Excel Discussion (Misc queries) | |||
Bold Font question | Excel Discussion (Misc queries) | |||
How to show only bold font ? | Excel Worksheet Functions | |||
Legends - Changing the Shape of | Charts and Charting in Excel |