Consulting

Results 1 to 4 of 4

Thread: Error showing userforms

  1. #1

    Error showing userforms

    Hi, sorry if this is a noob question, but Im having a problem displaying some userforms that I want to open when an excel file is open.

    Anytime I show a userform in the Private Sub Workbook_Open() in ThisWorkbook I am automatically kicked to vba editor and everything starts up in debug mode with the yellow cursor on the call to show the userform.

    These forms work fine when opened in the immediate box and this happens even when the userform is empty (just a default userform).

    Do I just have some option on or something that is automatically kicking to debug mode?

    If I try to step through the code I get this error

    Run-Time error '400':
    Application-defined or object-defined error


    Thanks for reading, Drew.

  2. #2
    VBAX Master
    Joined
    Jun 2007
    Location
    East Sussex
    Posts
    1,110
    Location
    What happens if you press f8 after you go into debug mode and the userform.show line is highlighted?
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    I get this error
    Run-Time error '400':
    Application-defined or object-defined error

    It must be some setting or I messed something up somewhere because even older excel sheets taht were working fine last week get this problem also now.

  4. #4
    VBAX Master
    Joined
    Jun 2007
    Location
    East Sussex
    Posts
    1,110
    Location
    Do you have any new add-ins installed? What settings do you have in the VBEditor under Tools->Options on the General tab for Error handling?
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •