Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi all
I am trying to get my workbook to open on the cover sheet. I have tried to use 2 to 3 codes but each time it comes up as run time error 9 out of range or opens on the last sheet I was working on. what can I do? Here is one of the codes, I have put it into the ThisWorkbook section in VBA Projects. The Sheet is named Cover and it is the last on my list at the bottom of the workbook and Sheet 14(Cover) in the Projects list. Regards Chris Private Sub Workbook_Open() Sheets("Cover").Activate Range("A1").Select End Sub |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Chris,
When you get the error does the line to activate the worksheet get highlighted because it appears to be an incorrect worksheet name. If so, it is probably something wrong with the worksheet name. This can be incorrectly spelt or even a space a the start or end of the name. Try re-naming the worksheet and ensure no leading or trailing spaces. -- Regards, OssieMac "Chris" wrote: Hi all I am trying to get my workbook to open on the cover sheet. I have tried to use 2 to 3 codes but each time it comes up as run time error 9 out of range or opens on the last sheet I was working on. what can I do? Here is one of the codes, I have put it into the ThisWorkbook section in VBA Projects. The Sheet is named Cover and it is the last on my list at the bottom of the workbook and Sheet 14(Cover) in the Projects list. Regards Chris Private Sub Workbook_Open() Sheets("Cover").Activate Range("A1").Select End Sub |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
just for the heck of it, try this. in a normal code module paste the
following Sub Auto_Open() Sheets("Cover").Activate Range("A1").Select End Sub and see if it works. first just run the code and if it works, save and open the workbook. -- Gary Keramidas Excel 2003 "Chris" wrote in message ... Hi all I am trying to get my workbook to open on the cover sheet. I have tried to use 2 to 3 codes but each time it comes up as run time error 9 out of range or opens on the last sheet I was working on. what can I do? Here is one of the codes, I have put it into the ThisWorkbook section in VBA Projects. The Sheet is named Cover and it is the last on my list at the bottom of the workbook and Sheet 14(Cover) in the Projects list. Regards Chris Private Sub Workbook_Open() Sheets("Cover").Activate Range("A1").Select End Sub |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Ossiemac
Well That made me feel dumb. didn,t see a space but there must have been one as I typed the name back in it wored fine, may have had one at the end. Thanks heaps for that Regards chris "OssieMac" wrote: Hi Chris, When you get the error does the line to activate the worksheet get highlighted because it appears to be an incorrect worksheet name. If so, it is probably something wrong with the worksheet name. This can be incorrectly spelt or even a space a the start or end of the name. Try re-naming the worksheet and ensure no leading or trailing spaces. -- Regards, OssieMac "Chris" wrote: Hi all I am trying to get my workbook to open on the cover sheet. I have tried to use 2 to 3 codes but each time it comes up as run time error 9 out of range or opens on the last sheet I was working on. what can I do? Here is one of the codes, I have put it into the ThisWorkbook section in VBA Projects. The Sheet is named Cover and it is the last on my list at the bottom of the workbook and Sheet 14(Cover) in the Projects list. Regards Chris Private Sub Workbook_Open() Sheets("Cover").Activate Range("A1").Select End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
force excel workbook to open to a specific worksheet | Excel Discussion (Misc queries) | |||
OPEN A WORKBOOK TO A SPECIFIC WORKSHEET | Excel Discussion (Misc queries) | |||
Open Workbook to Specific Worksheet? | Excel Discussion (Misc queries) | |||
How to open a workbook on a specific worksheet. | Excel Worksheet Functions | |||
Open workbook to specific worksheet | Excel Discussion (Misc queries) |