Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 788
Default Open Workbook on Specific Worksheet

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,510
Default Open Workbook on Specific Worksheet

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 72
Default Open Workbook on Specific Worksheet

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 788
Default Open Workbook on Specific Worksheet

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
force excel workbook to open to a specific worksheet Wenster Excel Discussion (Misc queries) 1 June 24th 09 04:53 PM
OPEN A WORKBOOK TO A SPECIFIC WORKSHEET Todd Excel Discussion (Misc queries) 2 March 26th 08 12:07 AM
Open Workbook to Specific Worksheet? Steven Hilgendorf Excel Discussion (Misc queries) 14 June 27th 07 12:22 AM
How to open a workbook on a specific worksheet. kevincanuk Excel Worksheet Functions 2 September 26th 06 02:21 PM
Open workbook to specific worksheet Dave Excel Discussion (Misc queries) 2 May 2nd 05 08:44 PM


All times are GMT +1. The time now is 06:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"