Good morning
I have a workbook with multiple sheets in it, and I am looking for some basic VBA code that ensures the Workbook always opens to a particular sheet every time it is opened, no matter where the person was looking when they last saved the workbook.
I am sure it will be a basic Workbook Open code, however a few attempts have left me high and dry.
See attached basic example, where I want it to always open on the "Welcome" tab.
Thanks
Darren.
Last edited by Grimace; 11-23-2011 at 07:36 PM.
Try this:
Private Sub Workbook_Open() Sheets(YourSheetName).Select End Sub
Alan
Click the * below to say thanks.
Database Principles
Pivot Table Tips
Good Excel Video Tutorials
Sumifs or SumProduct
DataPig Access Tutorials
MS Query Tutorial
Worst Pie Chart Ever?
You can use the Before close or open event.
The code goes into the ThisWorkbook Module
Private Sub Workbook_BeforeClose(Cancel As Boolean) Sheets(1).Select MsgBox "Good Bye" ActiveWorkbook.Save End Sub Private Sub Workbook_Open() Sheets(1).Select MsgBox "Welcome" End Sub
Thanks to everyone for replying so quickly ... all sorted now.
Really appreciate your help.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks