ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Selecet worksheet to open (https://www.excelbanter.com/excel-discussion-misc-queries/43621-selecet-worksheet-open.html)

Karel

Selecet worksheet to open
 
How can I open an excel file next time on selected predifend worksheet?

John E. Chapman

I assume you mean a predefined workSHEET within a normally opened workbook.
Just leave it on the required page and if you want also at the preferred
position on the worksheet when you save and close that file/workbook. The
important bit is the word SAVE. That is why you get asked to save or not to
save when you have only viewed a worksheet and have maybe only changed the
viewing position of the worksheet. Excel always opens a workbook exactly
where you leave it providing you save otherwise of course it defaults back
to the previous save!
I hope that is clear.
John


"Karel" wrote in message
...
How can I open an excel file next time on selected predifend worksheet?




Bob Phillips

Private Sub Workbook_Open()
Worksheets("Sheet2").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

RP
(remove nothere from the email address if mailing direct)


"Karel" wrote in message
...
How can I open an excel file next time on selected predifend worksheet?





All times are GMT +1. The time now is 11:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com