View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
CaptainQuattro
 
Posts: n/a
Default I want Excel to always open on Sheet 1


(Macro Security for your installation of Excel must be set to medium or
low for the following to work:)

The following macro will cause Sheet 1 to be displayed every time you
reopen the workbook:

Private Sub Workbook_Open()
Sheets("Sheet1").Activate
End Sub

The code for this macro must be saved as follows:

Select Tools Macros Visual Basic Editor

On the left of the Visual Basic Editor Screen you will see a Project
Window with a listing of objects and modules.

The last item on the list of Objects should be "ThisWorkbook"

Double-click on "ThisWorkbook"

A window will open titled xxxx.xls - ThisWorkbook (Code)

From the top left dropdown menu select Workbook
From the right top dropdown menu select Open

The subroutine title: "Private Sub Workbook_Open()" will appear, along
with End Sub.

Add the line

Sheets("Sheet1").Activate

X - out of VB editor, save your workbook and close it with any sheet
selected. When you re-open the file, it should flip to Sheet1.


--
CaptainQuattro
------------------------------------------------------------------------
CaptainQuattro's Profile: http://www.excelforum.com/member.php...o&userid=32763
View this thread: http://www.excelforum.com/showthread...hreadid=528377