+ Reply to Thread
Results 1 to 6 of 6

Macro Goes to Error Handler even after form opens

  1. #1
    Registered User
    Join Date
    10-18-2012
    Location
    Jackson, MI
    MS-Off Ver
    Excel 2010
    Posts
    8

    Macro Goes to Error Handler even after form opens

    After Front Lines Summary opens, macro still goes to errorhandler1 insteading of going to "else".
    Workbook is on a Shared Drive

    HTML Code: 

  2. #2
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: Macro Goes to Error Handler even after form opens

    what do you expect as a result here:
    Please Login or Register  to view this content.
    number? boolean?

    Works fine for me btw
    Last edited by tehneXus; 05-02-2013 at 04:45 PM.
    Please use [CODE]-TAGS
    When your problem is solved mark the thread SOLVED
    If an answer has helped you please click to give reputation
    Read the FORUM RULES

  3. #3
    Registered User
    Join Date
    10-18-2012
    Location
    Jackson, MI
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Macro Goes to Error Handler even after form opens

    The goal is:
    1) Check if Front Lines Summary work book is already open,
    2) If not open, open it or
    3) in case Front Lines Workbook was deleted provide an error message warning operator that work book has been moved or deleted.

    I manipulated that from a code I found but might have screwed it up in the process. The issue I am having right now is that the Front Lines Summary will open using the macro but it still goes to the error handler and provides a message box saying "The Front Lines Summary Sheet has been moved or deleted from the MFG SHOP USER SUMMARY FOLDER."

  4. #4
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: Macro Goes to Error Handler even after form opens

    like this?:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-28-2013
    Location
    Coventry
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Macro Goes to Error Handler even after form opens

    Im not sure if tehneXus has got the coding spot on but has the right idea

    I had a very similar problem when do a macro recently.
    The label ErrHandler1 is just a reference point in the code, a go-to point. When the macro reaches this point it carries on, it doesnt just skip over it.

    Please Login or Register  to view this content.
    This edited code will open the file and Goto Label1, therefore bypassing ErrHandler1

  6. #6
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: Macro Goes to Error Handler even after form opens

    Hi,

    I got the problem and suggested a slightly different approach as I wouldn't use more than one (error handler) goto-mark in the code, at some point when your code might grow bigger you'll know what i mean

+ 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