+ Reply to Thread
Results 1 to 10 of 10

Help! Block If without End If!! Problem

  1. #1
    Registered User
    Join Date
    08-01-2016
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    5

    Help! Block If without End If!! Problem

    Hello, im currently making a multi choice maths that includes 10 questions. My current code is :

    Please Login or Register  to view this content.






    When i start the test, the msg Block If without End If comes up plz help !!!
    Last edited by jankz; 08-02-2016 at 12:51 AM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Help! Block If without End If!! Problem

    Welcome to the board, jankz.

    Please take a few minutes to read the Forum Rules, and then edit your post to wrap your code with CODE tags.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Help! Block If without End If!! Problem

    Hi,
    Welcome to the forum.

    Please use code tags around the code.

    Properly close all your With Blocks with End With first and then test your code.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  4. #4
    Registered User
    Join Date
    08-01-2016
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    5

    Re: Help! Block If without End If!! Problem

    Sorry about not using code tags, anyway, what did you mean exactly by closing all my With Blocks with End With? Sorry im very new to vba

  5. #5
    Registered User
    Join Date
    08-01-2016
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    5

    Re: Help! Block If without End If!! Problem

    Okay I think i understood what you meant. I did this.

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    08-01-2016
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    5

    Re: Help! Block If without End If!! Problem

    Okay I think i understood what you meant. I did this.

    Please Login or Register  to view this content.

    But it still showed up with the error

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

    Re: Help! Block If without End If!! Problem

    Try this.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  8. #8
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Help! Block If without End If!! Problem

    Thanks for following the Rules.

    All the If blocks should be closed with End If like below....
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    08-01-2016
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    5

    Re: Help! Block If without End If!! Problem

    Thank you so much! You fixed my userform!!

  10. #10
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Help! Block If without End If!! Problem

    You're welcome. Glad we could help.

    If that takes care of your original question, please mark your thread as Solved by selecting Thread Tools (just above your first post) --> Mark thread as solved.

    You may also say thanks to those who have put their time and efforts to help you in this forum by clicking the Add Reputation link under their posts, another way to say thanks.

+ 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] Block if without end If problem
    By Raanan in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-12-2013, 01:03 PM
  2. Replies: 5
    Last Post: 10-09-2012, 10:44 AM
  3. pull from a block of data:Chart problem
    By jtd84 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 10-03-2010, 05:41 PM
  4. Replies: 2
    Last Post: 06-22-2010, 07:55 AM
  5. Address Block Problem
    By longfisher in forum Excel General
    Replies: 5
    Last Post: 05-10-2007, 08:51 AM
  6. Problem of With Target/End With block
    By chris46521 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-31-2006, 03:52 PM
  7. End if with block if - Pivot Table Problem
    By Nav in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-07-2006, 10:10 AM
  8. Title Block in Excel Chart - Size problem
    By Stuart Saich in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 10-25-2005, 07:05 AM

Tags for this Thread

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