Starting Excel with No Worksheets Open (77538)



The information in this article applies to:

  • Microsoft Excel for Windows 3.0
  • Microsoft Excel for Windows 4.0
  • Microsoft Excel for Windows 4.0a
  • Microsoft Excel for Windows 5.0
  • Microsoft Excel for Windows 95
  • Microsoft Excel for Windows 5.0c
  • Microsoft Excel for Windows 4.0c
  • Microsoft Excel for Windows 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).

  1. Enter the following into a macro sheet:

          A1: Auto_Open
          A2: =ON.TIME(NOW()+"00:00:02","SHUTDOWN")
          A3: =RETURN()
          A4: ShutDown
          A5: =ACTIVATE("Sheet1")
          A6: =CLOSE()
          A7: =RETURN()
  2. Select cell A1. Choose Define Name from the Formula menu. Select the Command option and choose OK.
  3. Select cell A4 and repeat Step 2 above.
  4. 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 "Microsoft Excel User's Guide 1," version 4.0 or query in the Microsoft Knowledge Base using the following words:

   startup and switches and command-line.
				

REFERENCES

"Microsoft Excel Function Reference," version 4.0, pages 305-306

"Microsoft Excel User's Guide 1," version 4.0, pages 7 and 60-61

"Microsoft Excel User's Guide 2," version 4.0, page 260

"Microsoft Excel Function Reference," version 3.0, page 168

"Microsoft Excel User's Guide," version 3.0, pages 139, 622

Modification Type:MinorLast Reviewed:8/15/2005
Keywords:KB77538