Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Alphabetically list of last names: BOLD, not bold | Excel Discussion (Misc queries) | |||
Alphabetically list of names BOLD and NOT bold | Excel Discussion (Misc queries) | |||
Filter Bold Cells VBA | Excel Discussion (Misc queries) | |||
how to select cells that are bold? | Excel Discussion (Misc queries) | |||
Join bold and non-bold text in one cell | Excel Discussion (Misc queries) |