+ Reply to Thread
Results 1 to 5 of 5

Setting Interior.ColorIndex in a range

  1. #1
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Setting Interior.ColorIndex in a range

    My macro is running from sheet2 (from a button)
    Why do I get an error with this?
    Please Login or Register  to view this content.
    StartNum = 7, EndNum = 15 and dateNum = 8 (checked these in the VBA Editor and they work out) I get an "application defined or object defined error with the range statement.

    Thanks in advance.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Setting Interior.ColorIndex in a range

    you didn't qualify the Cells properties
    Please Login or Register  to view this content.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Forum Contributor vikas.bhandari's Avatar
    Join Date
    04-07-2006
    Location
    Delhi, India
    MS-Off Ver
    Office 2007 and 2010
    Posts
    303

    Re: Setting Interior.ColorIndex in a range

    Possibilities:

    1. ColorNum is empty
    2. Since you are running from Sheet2, I would use

    Please Login or Register  to view this content.
    Just a thought.

    Vikas B

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Setting Interior.ColorIndex in a range

    Thanks, I had defined ColorNum, just forgot to mention it. It was the .cells. Didn't know I had to do that. Thanks again.

  5. #5
    Forum Contributor vikas.bhandari's Avatar
    Join Date
    04-07-2006
    Location
    Delhi, India
    MS-Off Ver
    Office 2007 and 2010
    Posts
    303

    Re: Setting Interior.ColorIndex in a range

    cool...

    It was good to know that even Forum Gurus gets stuck sometimes

    Cheers!!!
    Vikas B

+ 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