Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 295
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,420
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 295
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,420
Default 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
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
Bold font if statement drb Excel Worksheet Functions 3 March 9th 08 09:01 PM
Bold Font question Jenny B. Excel Discussion (Misc queries) 3 August 17th 07 04:02 PM
Bold Font question bj Excel Discussion (Misc queries) 1 August 17th 07 01:48 AM
How to show only bold font ? hamz Excel Worksheet Functions 2 March 8th 06 04:51 AM
Legends - Changing the Shape of Paul Charts and Charting in Excel 2 January 4th 06 12:22 PM


All times are GMT +1. The time now is 09:26 AM.

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

About Us

"It's about Microsoft Excel"