![]() |
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 |
making cells bold
Never mind I got it. : -- thephoenix1 ----------------------------------------------------------------------- thephoenix12's Profile: http://www.excelforum.com/member.php...fo&userid=2433 View this thread: http://www.excelforum.com/showthread.php?threadid=38167 |
All times are GMT +1. The time now is 10:40 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com