+ Reply to Thread
Results 1 to 3 of 3

Help with a if statement "Error Else without If"

  1. #1
    Forum Contributor
    Join Date
    08-14-2012
    Location
    Derby, England
    MS-Off Ver
    Excel 2010
    Posts
    257

    Help with a if statement "Error Else without If"

    Hi All,

    I cant get this to work:

    Please Login or Register  to view this content.
    What am i doing wrong? Thanks John

  2. #2
    Forum Contributor
    Join Date
    09-30-2013
    Location
    Toronto, ON
    MS-Off Ver
    Excel 2007
    Posts
    229

    Re: Help with a if statement "Error Else without If"

    Silly as it may seem, its because the Exit Sub is on the same line as the Then.
    If you put it onto the next line, it will work

  3. #3
    Forum Contributor
    Join Date
    08-14-2012
    Location
    Derby, England
    MS-Off Ver
    Excel 2010
    Posts
    257

    Re: Help with a if statement "Error Else without If"

    Thanks hectop

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] "If" statement results in Type mismatch error.
    By msmick in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-13-2012, 12:27 AM
  2. [SOLVED] How to Count number of "Error" and "OK" after the word "Instrument" found in table row
    By eltonlaw in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-17-2012, 06:26 AM
  3. Fix Userform IF Statement - Run Time Error "1004"
    By sawan202 in forum Excel General
    Replies: 2
    Last Post: 03-07-2012, 06:32 AM
  4. "Statement invalid outside Type block" error
    By theinexplicablefuzz in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-15-2011, 05:06 PM
  5. Replies: 3
    Last Post: 12-14-2006, 01:36 PM

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