1st sheet being displayed

T

Tia

Hello
is there is any way so that whenever i open my workbook i see the
first sheet wich is the main sheet with all the employees name on it
they click on their names and it will be linked to their sheet
but what ever y open it the last sheet opened will be displayed not
the main
Is there is any way it shows the main everytime you open ?

Tia
 
D

Dennis

Click on Tools - Macro - Visual Basic Editor
In the Left Hand Project Pane, Double Click ThisWorkbook
In the Workbook Open Event, put the code below & then Exit and Save the
Workbook.
Open it again and the first sheet should be displayed.

Private Sub Workbook_Open()
Me.Sheets(1).Select
End Sub
 
T

Tia

Click on Tools - Macro - Visual Basic Editor
In the Left Hand Project Pane, Double Click ThisWorkbook
In the Workbook Open Event, put the code below & then Exit and Save the
Workbook.
Open it again and the first sheet should be displayed.

Private Sub Workbook_Open()
    Me.Sheets(1).Select
End Sub






- Show quoted text -

Ok i went to developer visual basic i double clicked on the view excel
file and than view code and and i copy and paste it

Im doing something wrong b its not working
can you help me please im not good in visual basic

Tia
 
D

Dennis

I cannot see what you have done wrong so I don't know what to suggest.
What do you mean by double clicked on the "View Excel File" ?
You need to double click on the 'ThisWorkbook' usually at the bottom of a
list of worksheet names on the left hand side of the screen. You should then
paste the code on the right hand pane.
 
G

Gord Dibben

Right-click on the Excel Icon left of "File" on the worksheet menu bar.

Select "View Code" to open Thisworkbook module.

Paste the code into that module.

Alt + q to return to the Excel window.

Select any sheet but "Main".

Save, close and re-open.


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top