Microsoft KB Archive/77538

= Starting Excel with No Worksheets Open =

Article ID: 77538

Article Last Modified on 11/16/2006

-

APPLIES TO


 * Microsoft Excel 3.0 Standard Edition
 * Microsoft Excel 4.0 Standard Edition
 * Microsoft Excel 4.0a
 * Microsoft Excel 5.0 Standard Edition
 * Microsoft Excel 95 Standard Edition
 * Microsoft Excel 5.0c
 * Microsoft Excel 4.0c
 * Microsoft Excel 3.0a

-



This article was previously published under Q77538



SUMMARY
In Microsoft Excel, version 3.0, to start the program with no worksheets open, you can create an Auto_Open macro that closes Sheet1. Normally an Auto_Open macro will run before Sheet1 ever opens, so you must end the Auto_Open macro, allow Sheet1 to open, and then run a second macro that closes Sheet1. If you are using Microsoft Excel version 4.0, you may use the /e startup switch as an alternative to this macro.



MORE INFORMATION
The following Auto_Open macro uses the ON.TIME function to call a second macro two seconds later. This gives Sheet1 time to open before the second macro is executed. The second macro then closes Sheet1 and displays the Null menu bar (File and Help menus only).

  Enter the following into a macro sheet:

     A1: Auto_Open A2: =ON.TIME(NOW+&quot;00:00:02&quot;,&quot;SHUTDOWN&quot;) A3: =RETURN A4: ShutDown A5: =ACTIVATE(&quot;Sheet1&quot;) A6: =CLOSE A7: =RETURN  Select cell A1. Choose Define Name from the Formula menu. Select the Command option and choose OK. Select cell A4 and repeat Step 2 above. Save this macro sheet as an add-in macro in the EXCEL\XLSTART subdirectory. To save it as an add-in macro, choose Save As from the File menu, choose Options, and select Add-In from the File Format list.

This macro will result in an error if it is not saved as an add-in macro.

For additional information on the /e startup switch, see page 7 in the &quot;Microsoft Excel User's Guide 1,&quot; version 4.0 or query in the Microsoft Knowledge Base using the following words:

  startup and switches and command-line.

