+ Reply to Thread
Results 1 to 8 of 8

Syntax Error and Compile Error: Expected Line Number or Label...

  1. #1
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Washington DC
    MS-Off Ver
    Excel 2007
    Posts
    458

    Syntax Error and Compile Error: Expected Line Number or Label...

    Hello everyone.

    I am having a strange error. This code block used to work fine. So here is what I did, I changed the part of the code that reads CurrentName from CurrentTM_ID, and that seems to have caused the error. Any suggestions?


    Please Login or Register  to view this content.
    Last edited by AnthonyWB; 01-30-2011 at 10:43 PM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,474

    Re: Syntax Error and Compile Error: Expected Line Number or Label...

    Does the code know what "CurrentTM_ID" is? as the code does not show "CurrentTM_ID,", it shows
    "CurrentTMID"

  3. #3
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845

    Re: Syntax Error and Compile Error: Expected Line Number or Label...

    Hi,

    With in your code I do not see
    "CurrentName" nor "CurrentTM_ID"
    You do have however, "CurrentTMID"
    Charles

    There are other ways to do this, this is but 1 !
    Be Sure you thank those who helped.
    IF YOU'RE SATISFIED BY ANY MEMBERS RESPONSE TO YOUR ISSUE PLEASE USE THE STAR ICON AT THE BOTTOM LEFT OF THE POST UNDER THEIR NAME.

  4. #4
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Washington DC
    MS-Off Ver
    Excel 2007
    Posts
    458

    Re: Syntax Error and Compile Error: Expected Line Number or Label...

    Dave,

    Thanks, the "corrected" code (I got lost in named ranges)is below. The error however is the same as I had originally posted:

    Please Login or Register  to view this content.

  5. #5
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,474

    Re: Syntax Error and Compile Error: Expected Line Number or Label...

    I suppose a sample workbook would be required, with the code and with the error occurring.

  6. #6
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Washington DC
    MS-Off Ver
    Excel 2007
    Posts
    458

    Re: Syntax Error and Compile Error: Expected Line Number or Label...

    I found a temporary solution that works, although I am not sure why. I removed the following script form the code:

    Please Login or Register  to view this content.

  7. #7
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,474

    Re: Syntax Error and Compile Error: Expected Line Number or Label...

    What was that part of the code supposed to do?

  8. #8
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Washington DC
    MS-Off Ver
    Excel 2007
    Posts
    458

    Re: Syntax Error and Compile Error: Expected Line Number or Label...

    To be honest I am not sure what it was for. I inherited this project through contractual work, and it's spaghetti code, it's just a mess.

+ 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