+ Reply to Thread
Results 1 to 4 of 4

Complie error: End If without If

  1. #1
    Registered User
    Join Date
    11-27-2008
    Location
    Everywhere
    Posts
    11

    Complie error: End If without If

    Hi,

    I'm writing a bit of a code that will re-format all sheets in spreadsheet except the three named. I keep on getting compile errors whatever I do. It's driven me mad.

    Could you please have a look at this and tell me what the heck is wrong?

    Please Login or Register  to view this content.
    Thanks a million!
    Last edited by Seler Naciowy; 12-01-2008 at 07:54 AM.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    This should get you started

    Need to change activesheet to ws

    Please Login or Register  to view this content.
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    Compile error

    Hi

    The error is in the following line

    Please Login or Register  to view this content.
    There should not be an underscore as the select statement should be on the next line, also should be just ws.select.

    Regards

    Jeff

  4. #4
    Registered User
    Join Date
    11-27-2008
    Location
    Everywhere
    Posts
    11

    Thanks!

    Thanks, this was very helpful.
    The solution was the combination of the two answers.
    Please Login or Register  to view this content.
    Thanks a million for your help!

    Seler
    Last edited by Seler Naciowy; 12-01-2008 at 07:01 AM. Reason: skipped a row of code

+ 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