Share via

Open sheet in Developer mode

Anonymous
2022-10-07T10:51:35+00:00

Hello, I need help please.

I have an excel worksheet that opens a InputBox upon opening but I have an error in my code. Part of the code is to close the worksheet if the cancel button is selected. Now no matter if I put anything in the Input field or select the OK button it acts as if I selected the cancel button and the worksheet closes.

How can I open the worksheet and get access to the code?

Thanks in your advance for your help.

Rich

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Anonymous
    2022-10-07T11:56:29+00:00

    Hi Normal,

    I tried the Shift Key method, and it did not help. However, I was able to access my code by pressing the Ctrl+Break keys.

    Thank you.

    Rich

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2022-10-07T11:41:59+00:00

    Hi Rich,

    I have an excel worksheet that opens a InputBox upon opening but I have an error in my code. Part of the code is to close the worksheet if the cancel button is selected. Now no matter if I put anything in the Input field or select the OK button it acts as if I selected the cancel button and the worksheet closes.

    How can I open the worksheet and get access to the code?

    Keep the shift key depressed when you open the file. This should disable the Workbook_Open procedure and enable you to access your code.

    Alternatively, before opening the problematic file, type the following instruction in the immediate window of the VBA editor and press Return:

            Application.EnableEvents=False  
    

    This will disable all event code from running until you change this setting to True or you restart Excel

    ===

    Regards,

    Norman

    Immagine

    Was this answer helpful?

    0 comments No comments