+ Reply to Thread
Results 1 to 2 of 2

Compile Error: Expected End Sub

  1. #1
    Registered User
    Join Date
    05-23-2011
    Location
    Lincoln, NE
    MS-Off Ver
    Excel 2007
    Posts
    30

    Compile Error: Expected End Sub

    I keep getting this error when I compile my project. I have copied and pasted my code into the attached document. After I clear the error message box, my 'Generate ticket number comment is highlighted so I assume means that that is where the error is occurring. If I add End Sub just prior to that comment, I get the following Compile Error: Only Comments may appear after End Sub, End Function, or End Property. When I click OK on that message, the highlighted ("A1") appears.

    I'm not sure what is going on here.
    Attached Files Attached Files

  2. #2
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Compile Error: Expected End Sub

    Hi Lothar69,

    I don't know if this is the problem but trying changing
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    This is the last if statement that you have.
    If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.

    ---Keep on Coding in the Free World---

+ 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