+ Reply to Thread
Results 1 to 3 of 3

Can i change a fill color in vba?

  1. #1
    Jon
    Guest

    Can i change a fill color in vba?

    I am trying to color a selection i have made in vba, is there a command
    to do this? Also, I would like to change the font color.


  2. #2
    Edwin Tam
    Guest

    RE: Can i change a fill color in vba?

    For example, to fill a cell with yellow:
    Selection.Interior.ColorIndex = 6 'yellow

    To assign a red font color:
    Selection.Font.ColorIndex = 46 'red

    Also, why not play with the "record macro" function? From the tools menu,
    choose macro, then record macro. Set the color manually and let Excel produce
    the macro for you. Then, you can easily find out the correct colorindex for
    the color you need!

    Regards,
    Edwin Tam
    [email protected]
    http://www.vonixx.com



    "Jon" wrote:

    > I am trying to color a selection i have made in vba, is there a command
    > to do this? Also, I would like to change the font color.
    >
    >


  3. #3
    Jon
    Guest

    Re: Can i change a fill color in vba?

    yer right, im an idiot. thanks


+ 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