+ Reply to Thread
Results 1 to 4 of 4

Short Macro Compile Error

  1. #1
    Registered User
    Join Date
    10-15-2011
    Location
    IL
    MS-Off Ver
    Excel 2007
    Posts
    7

    Short Macro Compile Error

    I am learning VBA for Excel and am amazingly stuck on something quite simple. Here is my macro (designed to simply bold numbers >5 and leave numbers <= 5 as regular font):

    Please Login or Register  to view this content.
    When I go to run this, I get an error that states Else Without If. I cannot for the life of me figure out what is wrong with the syntax. Additionally, even stranger, is that it will bold the numbers after numerous error messages.
    Last edited by vlady; 03-13-2013 at 07:33 PM. Reason: don't forget code tags

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Short Macro Compile Error

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-15-2011
    Location
    IL
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Short Macro Compile Error

    I got an error when I ran your code that says, "Object doesn't support this property or method."

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

    Re: Short Macro Compile Error

    Please Login or Register  to view this content.
    for the less than 5 numbers
    Josie

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

+ 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