Share via

How to open excel in safe mode?

Anonymous
2011-12-23T08:04:01+00:00

It seems to me that my excel file is corrupted, but I am still able to open it with ctrl, after that it keeps busy forever, and not able to stop it.

There is no error message, just keep busy running.

The latest change I did is to add following coding, when I close file the last time,  ABC_123 was highlighted, can I use "_" within the name of Sub?

Does anyone have any suggestions on how to open excel with stopping any process? so I can recover the coding.

Thanks in advance for any suggestions

Sub ABC_123()

 ...

End sub

Microsoft 365 and Office | Excel | For home | 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

Answer accepted by question author

  1. Anonymous
    2011-12-23T10:17:08+00:00

    oem7110 wrote:

    Subject:  how to open excel in safe mode?

    It seems to me that my excel file is corrupted, but I am still able to open it with ctrl

    Pressing Ctrl while (double-)clicking on an Excel file icon does not start Excel in safe mode.

    Instead, you must (double-)click on the Excel program icon while pressing and holding Ctrl.  Continue to hold down Ctrl until you see the following prompt:

    Click on Yes.  Once Excel is open, click on File, then Open to open your file.  (But see below first.)

    Note:  If you suspect a corrupted Excel program shortcut (unlikely), you can click on Start, then Run from the desktop, and enter the full path name for excel.exe followed by /s separated by a space.  For the default XL2003 path, the command would be (note the use of double quotes):

    "C:\Program Files\Microsoft Office\OFFICE11\excel.exe" /s

    But you should use Explore or Search File to find excel.exe on your system, in case it is not installed in the default path.

    oem7110 wrote:

    after that it keeps busy forever, and not able to stop it.

    Before you open the file in Excel, set manual calculation mode (Tools > Options > Calculation).

    Also, set macro security to Medium (choose whether or not to run macros).  Then when you open the Excel file, choose to disable macros.

    Note:  This will not stop all open processing.  For example, if you use INDEX in some contexts, Excel does recalculate those formulas, even though INDEX is not a volatile function.

    oem7110 wrote:

    can I use "_" within the name of Sub?

    Yes.

    10+ people found this answer helpful.
    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Anonymous
    2011-12-23T10:24:33+00:00

    Press and hold the [Shift] key when you open the file to keep any macros from running when it opens.

    Underscore characters are allowed in Sub/Function names.  Excel itself does it with workbook and worksheet event code subs, as Private Sub Workbook_BeforeClose(Cancel As Boolean)

    Or you can try this: Open Excel.  Go to Tools --> Macros --> Security and set your macro security to MEDIUM.  This will give you an alert when you open workbooks with macros in them and you get the option to enable macros or not.  That should get control of things again.

    If you added code with what might be a problematic loop in it, you might even add a DoEvents statement inside of it that will help you to use the [Break] key to interrupt code if it's getting locked in the loop.  Like this:

    X = 0

    Do Until X = 1

       DoEvents

       ..... more code here, but forgot to bump X up to 1 which makes it perpetual loop

    Loop

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2011-12-23T15:03:11+00:00

    Thanks everyone very much for suggestions

    0 comments No comments
  3. Anonymous
    2011-12-23T09:08:29+00:00

    It seems to me that my excel file is corrupted, but I am still able to open it with ctrl, after that it keeps busy forever, and not able to stop it.

    There is no error message, just keep busy running.

    The latest change I did is to add following coding, when I close file the last time,  ABC_123 was highlighted, can I use "_" within the name of Sub?

    Does anyone have any suggestions on how to open excel with stopping any process? so I can recover the coding.

    Thanks in advance for any suggestions

     

    Sub ABC_123()

     ...

    End sub

    Excel can be started by using a switch /s (or maybe /safe or /safemode).

    Have a look here for more info on this: http://www.cpearson.com/excel/StartupErrors.aspx

    Hope this helps / Lars-Åke

    0 comments No comments