+ Reply to Thread
Results 1 to 2 of 2

making cells bold

  1. #1
    Registered User
    Join Date
    06-15-2005
    Posts
    39

    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

  2. #2
    Registered User
    Join Date
    06-15-2005
    Posts
    39
    Never mind I got it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1