Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Formatting Row with Macros

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Location
    Waterdown, Ontario
    Posts
    464
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I want to be able to format a row (borders, shades, data validation, etc.) using a macros. However I want it to be able start from the a cell on any row. I.E. If the higlighted cell is A9, it formats row 9, if the highlighted cell is A300, then row 300 gets formated, etc. The macros works fine from where I started but, I don't know how to get it to work from any row. Is there such thing as a Range("Current").Select line of code?

    [ This Message was edited by: ammdumas on 2002-05-02 12:44 ]

  2. #2
    Board Regular
    Join Date
    Apr 2002
    Posts
    85
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Try:

    sub Format ()
    With Selection.row
    .font.bold = true
    .numberformat = "@"
    'whatever code you want
    'try recording it if youre not sure
    end with

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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