Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VISUAL BASIC CODE
Please advise what visual basic code I need to use to always open my file
showing the first worksheet even though I save the file at 2nd or 3rd worksheets. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VISUAL BASIC CODE
Josephine,
Assuming you are using something like: Set MyWB=Workbooks.Open(PathAndFilename) add a line: MyWB.Worksheets(1).Activate ...... NickHK "Josephine Ng" <Josephine wrote in message ... Please advise what visual basic code I need to use to always open my file showing the first worksheet even though I save the file at 2nd or 3rd worksheets. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VISUAL BASIC CODE
You could also try an event handler. It goes in the ThisWorkBook module.
Private Sub Workbook_Open() Worksheets(1).Activate End Sub "Josephine Ng" wrote: Please advise what visual basic code I need to use to always open my file showing the first worksheet even though I save the file at 2nd or 3rd worksheets. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Visual Basic code | Excel Discussion (Misc queries) | |||
I need a visual basic code....please | Excel Discussion (Misc queries) | |||
Visual basic Code | Excel Programming | |||
visual basic code | Excel Programming | |||
Visual Basic Code | Excel Programming |