+ Reply to Thread
Results 1 to 4 of 4

Microsoft Visual Basic Compile Error: Expected End Sub

  1. #1
    Registered User
    Join Date
    08-23-2012
    Location
    Delaware
    MS-Off Ver
    2007
    Posts
    2

    Microsoft Visual Basic Compile Error: Expected End Sub

    I am receiving Microsoft Visual Basic Compile Error: Expected End Sub on the code listed below. Can anyone please help me decipher what needs to be corrected?

    Please Login or Register  to view this content.
    Last edited by jeffreybrown; 08-23-2012 at 03:49 PM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Microsoft Visual Basic Compile Error: Expected End Sub

    You should put code in code tags - see the Forum Rules.

    However, your first 2 lines are:

    Please Login or Register  to view this content.
    and so Excel would expect an End Sub before your second line.

    Hope this helps.

    Pete

  3. #3
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Microsoft Visual Basic Compile Error: Expected End Sub

    Get rid of this line
    Please Login or Register  to view this content.
    And put your posted code in tags before the Mods get both the three of us ...

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here

  4. #4
    Registered User
    Join Date
    08-23-2012
    Location
    Delaware
    MS-Off Ver
    2007
    Posts
    2

    Re: Microsoft Visual Basic Compile Error: Expected End Sub

    Thank you for pointing out that code needs to be tagged.

    I am still able to save the workbook without having the required cells fulfilled. Is the code I posted just prompting a message box (which I am not getting) or does it actually restrict the user from saving?

    Please Login or Register  to view this content.
    Last edited by jeffreybrown; 08-23-2012 at 03:49 PM.

+ 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