Saving a Worksheet

S

Sibbs

Not sure whether I have worded the the subject heading right or not but here
goes but if someone can point me in the right direction I would be very
grateful.

Here goes

I have a workbook with many many sheets but the "main" sheet has hyperlinks
to all the other sheets.

When I save data to, say for argument sake sheet 1 and then save and close
the workbook down, I would like it when opened up again, open "main" rather
than "sheet 1" the point of the last save.

can this be done? If so, how?

Cheers in advance
 
B

Bob Phillips

Private Sub Workbook_Open()
Worksheets("Main").Activate
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
J

JLatham

You need a little code in the workbook's _Open event processor:

Private Sub Workbook_Open()
ThisWorkbook.Worksheets("Main").Select
End Sub

To put the code in the proper place in your workbook, open that workbook and
right click on the Excel icon immediately to the left of the word File in the
menu toolbar and choose [View Code] from the popup list. Copy and paste the
code above into the code module. Save the workbook.
 
S

Sibbs

Cheers guys, worked a treat. Thanks again

JLatham said:
You need a little code in the workbook's _Open event processor:

Private Sub Workbook_Open()
ThisWorkbook.Worksheets("Main").Select
End Sub

To put the code in the proper place in your workbook, open that workbook and
right click on the Excel icon immediately to the left of the word File in the
menu toolbar and choose [View Code] from the popup list. Copy and paste the
code above into the code module. Save the workbook.

Sibbs said:
Not sure whether I have worded the the subject heading right or not but here
goes but if someone can point me in the right direction I would be very
grateful.

Here goes

I have a workbook with many many sheets but the "main" sheet has hyperlinks
to all the other sheets.

When I save data to, say for argument sake sheet 1 and then save and close
the workbook down, I would like it when opened up again, open "main" rather
than "sheet 1" the point of the last save.

can this be done? If so, how?

Cheers in advance
 

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