+ Reply to Thread
Results 1 to 4 of 4

Getting Expected End Sub error.. No Reason!

  1. #1
    Registered User
    Join Date
    04-15-2014
    Location
    hell
    MS-Off Ver
    Excel 2007
    Posts
    16

    Getting Expected End Sub error.. No Reason!

    Hi,

    I am using one of Ron De Bruins useful Excel VBAs to send a PDF Email from Excel. For some reason, I am getting the "Expected End Sub" error when the End Sub line is present. I do not know what is wrong but whatever code I use, I am getting this error. Here is the code:
    Please Login or Register  to view this content.
    Can Someone help?
    Last edited by PatCell; 04-22-2014 at 12:46 PM.

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Getting Expected End Sub error.. No Reason!

    Hi, PatCell,

    could you please comply with the Forum Rules (here: #3) and wrap your procedure with code-tags? You must decide whether you want to use a Commandbutton or a normal Sub.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    04-15-2014
    Location
    hell
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Getting Expected End Sub error.. No Reason!

    I want to use the Commandbutton but I do not know what to remove from the code to remove the error.

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Getting Expected End Sub error.. No Reason!

    Hi, PatCell,

    comment out the line
    Please Login or Register  to view this content.
    to read the beginning of the procedure like
    Please Login or Register  to view this content.
    Ciao,
    Holger

+ 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] #Ref error cant work out the reason
    By Tristanfrontline in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-16-2013, 02:02 AM
  2. [SOLVED] #REF! error.... for no apparent reason
    By singer.joseph in forum Excel Formulas & Functions
    Replies: 30
    Last Post: 02-25-2013, 06:44 AM
  3. CIRCULAR Error for no good reason
    By TeaNicola in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-07-2012, 07:19 PM
  4. Syntax Error and Compile Error: Expected Line Number or Label...
    By AnthonyWB in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-31-2011, 09:59 AM
  5. [SOLVED] Help with this error Unknown reason for error with Range().Select
    By Brad Sumner in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-13-2005, 12:05 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