LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default making cells bold


Hi,

I'm new to visual basic programming, and I'm having some trouble with a
simple task. I'm trying to make all the cells in a certain range on all
my worksheets bold.
Here is the code I am using:

Sub Bold()
Dim RowB As Range
Set RowB = Worksheets("Sheet1:Sheet70").Range("B9:B60")
RowB.Font.Bold = True
End Sub

When I try to run it, a message pops up saying "out of range". Any
suggestions? Also, is it possible that instead of using the range
"sheet1:sheet70", I could just write something that would make the
program perform the task on all the sheets in the workbook? This would
be preferrable in case new sheets are added, so that I do not need to
alter the code.

Thanks,

-Steve


--
thephoenix12
------------------------------------------------------------------------
thephoenix12's Profile: http://www.excelforum.com/member.php...o&userid=24336
View this thread: http://www.excelforum.com/showthread...hreadid=381678

 
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
Alphabetically list of last names: BOLD, not bold Lerner Excel Discussion (Misc queries) 16 March 1st 09 07:46 PM
Alphabetically list of names BOLD and NOT bold Lerner Excel Discussion (Misc queries) 13 March 1st 09 02:37 PM
Filter Bold Cells VBA Teddy-B Excel Discussion (Misc queries) 2 February 20th 09 05:33 PM
how to select cells that are bold? Elizabeth Excel Discussion (Misc queries) 1 April 2nd 06 07:10 PM
Join bold and non-bold text in one cell bkincaid Excel Discussion (Misc queries) 3 March 21st 06 12:58 AM


All times are GMT +1. The time now is 04:09 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"