none
keep getting Compile Error Label not defined as far i can tell i created line label like always did before. RRS feed

  • Question

  •  

    I keep getting this msg

     

    VBA

    Compile Error:

    Label not defined

     

    Yes, Label starts with a letter.

    Label Has No spaces

    Label Has Nothing but letters.

    Label's First letter is in column 1   ( per the editor in Access VBA code editor )

    Label Does end with a “ : “   at end.   Not with the extra spaces or quotes.

    i Did comment the line out with the Label,  ( only label on the line). On a new line I retyped the same label.

    i Did save, do a RefreshAll, did a close of VBA editor, then restarted VBA editor, clicked on reset, then debug got same msg.

    i did this between every time i tried a different way.

    I used GoTo ErrHandler

    then added    On Error GoTo ErrHander

    I copied the label from the Goto line, then pasted it at spot I want, with first letter in column 1, added “  :   at the end,  so no way I could have misspelled the label.

    I also did the same using  57     as the label, I did put label on line 57 just in case.   as in goto a line number.

     

     

    Every time I get the same msg.

     

    Only thing I noticed that was different is in     Tools / References I see under Available References the below

    EditionUpgradeHelperLib

    Location  C:\Windows\Systems32\ EditionUpgradeHelperLib.dll

    Language:  Standard

     

    That is the only reference I do NOT ever recall seeing before. If definitely was no picked before.

    I did search net, only info I got came to this, download third party app(s) that is supposed to check all “dll” files , fix them, and remove them if you want to, but that doc had a LONG list of things to do before run program, and hope fixes, not make worse. and how to reinstall the dll if it turns out you MUST have it.

    Was never able to find out what that file is supposed to do.

    Never before had this msg, unless I made a typo.

     

    I do have under Available references checked

    Visula Basic For Applications

    Microsoft Access 16.0 Object Library

    OLE Automation

    Microsoft Office 16.0 Access database engine Object Library

    Microsoft Office 16.0 Object Library

     

    i thank you for any help you can give.

    mark J


    Mark J

    Sunday, September 1, 2019 10:04 PM

Answers

  • Hi Mark J,

    Could you use "Code block"?

    I hope you will provide more, if you have more than 5 lines.  And I'd like to confirm which is your Office application, i.e. Word, Excel, or Access.

    Regards, 

    Ashidacchi -- https://ssl01.rocketnet.jp/hokusosha.com/default.html

    • Marked as answer by PuzzledByWord Thursday, September 5, 2019 6:45 PM
    Monday, September 2, 2019 2:42 AM
  • Ashidacchi,

    Application is Access.

    I thought maybe some of my code was causing the problem.

    so I commented out ALL in that code.  Then clicked on Reset, then Debug, then save. NO errors popped up. 

    then also did a compact and repair of compete base.

    then entered ONLY the lines I showed.   still the problem.

    THEN I checked for updates, found Quality update 2019-8 Cumulative Update for Windows 10 Version 1903 for x64-based s=Systems (KB4512941)

    installed it, rebooted. NOW NO PROBLEMS WITH "LABELS"

    SEEMS problem was the windows update installed shortly before this one.

    thank you for all the effort you have spent helping me.

    turns out I was using a "Label" correctly, a windows update had gotten my computer confused about VBA 7

    thanks again,

    Mark J


    Mark J

    • Marked as answer by PuzzledByWord Thursday, September 26, 2019 6:23 AM
    Thursday, September 5, 2019 6:44 PM

All replies

  • Hi,
    Could you provide your code?
    Regards,

    Ashidacchi -- https://ssl01.rocketnet.jp/hokusosha.com/default.html

    Monday, September 2, 2019 1:19 AM
  • Ashidacchi Hokusosha,

    thank you so much for your quick response.

    all the code i had at the time was 

    GoTo ProcOverload

    if x > 20 then

    ' put  code to create report here  I did during this comment out this line 

    ProcOverload:

    msgbox "ProcOverLoad. Correct Input."


    Mark J

    Monday, September 2, 2019 2:09 AM
  • Hi Mark J,

    Could you use "Code block"?

    I hope you will provide more, if you have more than 5 lines.  And I'd like to confirm which is your Office application, i.e. Word, Excel, or Access.

    Regards, 

    Ashidacchi -- https://ssl01.rocketnet.jp/hokusosha.com/default.html

    • Marked as answer by PuzzledByWord Thursday, September 5, 2019 6:45 PM
    Monday, September 2, 2019 2:42 AM
  • Ashidacchi,

    Application is Access.

    I thought maybe some of my code was causing the problem.

    so I commented out ALL in that code.  Then clicked on Reset, then Debug, then save. NO errors popped up. 

    then also did a compact and repair of compete base.

    then entered ONLY the lines I showed.   still the problem.

    THEN I checked for updates, found Quality update 2019-8 Cumulative Update for Windows 10 Version 1903 for x64-based s=Systems (KB4512941)

    installed it, rebooted. NOW NO PROBLEMS WITH "LABELS"

    SEEMS problem was the windows update installed shortly before this one.

    thank you for all the effort you have spent helping me.

    turns out I was using a "Label" correctly, a windows update had gotten my computer confused about VBA 7

    thanks again,

    Mark J


    Mark J

    • Marked as answer by PuzzledByWord Thursday, September 26, 2019 6:23 AM
    Thursday, September 5, 2019 6:44 PM