English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories
1

i have a workbook called 'test.xls' with worksheets 'pg1' and 'pg2'

can u giv a macro so dat wenever i open test.xls - pg1 is opened by default?

Thnx

2006-09-06 22:14:47 · 3 answers · asked by siddzonline 1 in Computers & Internet Programming & Design

3 answers

Another option is to put code in the auto_close event that selects that sheet and saves the workbook before the close completes.

Put this code in a module of your workbook:
Sub auto_close()
'Selection code here.
'Save code here.
End Sub

2006-09-07 06:42:24 · answer #1 · answered by Ken C. 6 · 0 0

You don't need a macro. Just drag the "pg1" tab to the left of the "pg2" tab at the bottom of the worksheets. This will produce the desired effect.

Also, you might like to learn to spell at some point.

Rawlyn.

2006-09-06 22:23:31 · answer #2 · answered by Anonymous · 0 0

Sub Auto_Open()
ActiveWorkbook. Worksheets("pg1"). Activate
End Sub

2006-09-07 00:51:39 · answer #3 · answered by f 3 · 1 0

fedest.com, questions and answers