+ Reply to Thread
Results 1 to 5 of 5

Keep getting Block without end if error. Please help!!

  1. #1
    Registered User
    Join Date
    04-17-2017
    Location
    Singapore
    MS-Off Ver
    2013
    Posts
    3

    Keep getting Block without end if error. Please help!!

    Hi All,

    I combined two marco codes i found online into one but keep getting the "Block without end if error".

    Could someone kindly please go through the code below to spot any errors, and help to rectify it please? Your help is deeply appreciated! Been stuck on this for days.

    Please Login or Register  to view this content.

    Thank you!!
    Last edited by Antonchann; 04-17-2017 at 10:21 PM.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Keep getting Block without end if error. Please help!!

    You've got an End If and a Nex missing.

    Try this.
    Please Login or Register  to view this content.
    PS Can you please add code tags when posting code?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    04-17-2017
    Location
    Singapore
    MS-Off Ver
    2013
    Posts
    3

    Re: Keep getting Block without end if error. Please help!!

    Quote Originally Posted by Norie View Post
    You've got an End If and a Nex missing.

    Try this.
    Please Login or Register  to view this content.
    PS Can you please add code tags when posting code?
    Apologies, i'm not sure what code tags. I will refer to your "If posting code please use code tags, see here." to try to understand.

    Thanks for your edit, however i am not getting a "file not found error" for 'Kill TempFilePath & TempFileName & FileExtStr

    would it be helpful if i post the two originally seperate codes which I am trying to merge?

    1) First code

    Please Login or Register  to view this content.

    2) Second code


    Please Login or Register  to view this content.
    Last edited by Antonchann; 04-17-2017 at 09:55 PM.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Keep getting Block without end if error. Please help!!

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

  5. #5
    Registered User
    Join Date
    04-17-2017
    Location
    Singapore
    MS-Off Ver
    2013
    Posts
    3

    Re: Keep getting Block without end if error. Please help!!

    Sorry for the infringement. I have amended accordingly!

+ 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. End if block error help
    By swade730 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-23-2015, 05:05 PM
  2. [SOLVED] Block If without End IF Error
    By mdovey in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 01-25-2014, 05:59 PM
  3. Block If without End If Error
    By catherine.ckk in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-17-2013, 02:39 PM
  4. Replies: 5
    Last Post: 10-09-2012, 10:44 AM
  5. end if without block if error
    By prajesh in forum Excel General
    Replies: 13
    Last Post: 11-17-2011, 04:51 AM
  6. End If Without block if error
    By nods in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-09-2010, 11:52 AM
  7. End If with out block if error
    By nods in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-08-2010, 02:13 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