Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Chart to be first sheet to open

Hi,

I have a workbook with many sheets. I can make any worksheet I want to
be the initial sheet to be opened when the document is opened, HOWEVER
I want to make a chart the initial sheet to open and I cant make this
work.

I am running excel2000

Cheers,
Gazza

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 136
Default Chart to be first sheet to open

Paste this into the workbook code area:

Private Sub Workbook_Open()
Sheets("ChartName").Activate
End Sub

Make sure that:
1. You paste it into the workbook code window, not in a module.
2. Macros are set to run when workbook opens.




"gazza67" wrote:

Hi,

I have a workbook with many sheets. I can make any worksheet I want to
be the initial sheet to be opened when the document is opened, HOWEVER
I want to make a chart the initial sheet to open and I cant make this
work.

I am running excel2000

Cheers,
Gazza


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Chart to be first sheet to open

This only applies to worksheets, it would not work on a chartsheet.







On Aug 31, 1:50 pm, Tevuna wrote:
Paste this into the workbook code area:

Private Sub Workbook_Open()
Sheets("ChartName").Activate
End Sub

Make sure that:
1. You paste it into the workbook code window, not in a module.
2. Macros are set to run when workbook opens.

"gazza67" wrote:
Hi,


I have a workbook with many sheets. I can make any worksheet I want to
be the initial sheet to be opened when the document is opened, HOWEVER
I want to make a chart the initial sheet to open and I cant make this
work.


I am running excel2000


Cheers,
Gazza



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6,582
Default Chart to be first sheet to open

It does work with a chart sheet (I just tested it to be sure). Where did you
put the code?

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"gazza67" wrote in message
ups.com...
This only applies to worksheets, it would not work on a chartsheet.







On Aug 31, 1:50 pm, Tevuna wrote:
Paste this into the workbook code area:

Private Sub Workbook_Open()
Sheets("ChartName").Activate
End Sub

Make sure that:
1. You paste it into the workbook code window, not in a module.
2. Macros are set to run when workbook opens.

"gazza67" wrote:
Hi,


I have a workbook with many sheets. I can make any worksheet I want to
be the initial sheet to be opened when the document is opened, HOWEVER
I want to make a chart the initial sheet to open and I cant make this
work.


I am running excel2000


Cheers,
Gazza





  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Chart to be first sheet to open

I put it in the workbook code window (in the title bar for the window
it says Microsoft Visual Basic - MyBookName.xls - [ThisWorkbook(code)]

If I modify the code and put a normal worksheet in it works as
expected, if I change the code to the name of a chartsheet I get

Run-time error '9':
Subscript out of range

Gary



On Sep 2, 6:30 am, "Jon Peltier"
wrote:
It does work with a chart sheet (I just tested it to be sure). Where did you
put the code?

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. -http://PeltierTech.com
_______

"gazza67" wrote in message

ups.com...

This only applies to worksheets, it would not work on a chartsheet.


On Aug 31, 1:50 pm, Tevuna wrote:
Paste this into the workbook code area:


Private Sub Workbook_Open()
Sheets("ChartName").Activate
End Sub


Make sure that:
1. You paste it into the workbook code window, not in a module.
2. Macros are set to run when workbook opens.


"gazza67" wrote:
Hi,


I have a workbook with many sheets. I can make any worksheet I want to
be the initial sheet to be opened when the document is opened, HOWEVER
I want to make a chart the initial sheet to open and I cant make this
work.


I am running excel2000


Cheers,
Gazza





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6,582
Default Chart to be first sheet to open

Go back to Tevuna's original response. Did you paste the code exactly as is?
Did you then change to the correct chart sheet name, in quotes? If not, you
will get the RTE 9 Subscript error you report. Note that the default name
"Chart1" has no space before the number.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"gazza67" wrote in message
ups.com...
I put it in the workbook code window (in the title bar for the window
it says Microsoft Visual Basic - MyBookName.xls - [ThisWorkbook(code)]

If I modify the code and put a normal worksheet in it works as
expected, if I change the code to the name of a chartsheet I get

Run-time error '9':
Subscript out of range

Gary



On Sep 2, 6:30 am, "Jon Peltier"
wrote:
It does work with a chart sheet (I just tested it to be sure). Where did
you
put the code?

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. -http://PeltierTech.com
_______

"gazza67" wrote in message

ups.com...

This only applies to worksheets, it would not work on a chartsheet.


On Aug 31, 1:50 pm, Tevuna wrote:
Paste this into the workbook code area:


Private Sub Workbook_Open()
Sheets("ChartName").Activate
End Sub


Make sure that:
1. You paste it into the workbook code window, not in a module.
2. Macros are set to run when workbook opens.


"gazza67" wrote:
Hi,


I have a workbook with many sheets. I can make any worksheet I want
to
be the initial sheet to be opened when the document is opened,
HOWEVER
I want to make a chart the initial sheet to open and I cant make
this
work.


I am running excel2000


Cheers,
Gazza





  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Chart to be first sheet to open

Jon and Tevuna,

Thanks for you help. My problem was that I was using the statement
WorkSheets("ChartName").Activate .

This statement works fine for worksheets but throws the RTE 9 error
when applied to a chart.

I needed the statement
Sheets("ChartName").Activate .
Which Tevuna correctly supplied, once again,

THANKs


On Sep 5, 10:38 pm, "Jon Peltier"
wrote:
Go back to Tevuna's original response. Did you paste the code exactly as is?
Did you then change to the correct chart sheet name, in quotes? If not, you
will get the RTE 9 Subscript error you report. Note that the default name
"Chart1" has no space before the number.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. -http://PeltierTech.com
_______

"gazza67" wrote in message

ups.com...

I put it in the workbook code window (in the title bar for the window
it says Microsoft Visual Basic - MyBookName.xls - [ThisWorkbook(code)]


If I modify the code and put a normal worksheet in it works as
expected, if I change the code to the name of a chartsheet I get


Run-time error '9':
Subscript out of range


Gary


On Sep 2, 6:30 am, "Jon Peltier"
wrote:
It does work with a chart sheet (I just tested it to be sure). Where did
you
put the code?


- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. -http://PeltierTech.com
_______


"gazza67" wrote in message


roups.com...


This only applies to worksheets, it would not work on a chartsheet.


On Aug 31, 1:50 pm, Tevuna wrote:
Paste this into the workbook code area:


Private Sub Workbook_Open()
Sheets("ChartName").Activate
End Sub


Make sure that:
1. You paste it into the workbook code window, not in a module.
2. Macros are set to run when workbook opens.


"gazza67" wrote:
Hi,


I have a workbook with many sheets. I can make any worksheet I want
to
be the initial sheet to be opened when the document is opened,
HOWEVER
I want to make a chart the initial sheet to open and I cant make
this
work.


I am running excel2000


Cheers,
Gazza



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
chart error message / work sheet not open ? Ron Charts and Charting in Excel 2 July 17th 07 08:16 PM
why, when i open a work sheet does a blank sheet open as well John Excel Discussion (Misc queries) 2 July 7th 07 06:20 PM
When I open Excel I want it to open on Sheet 1 traveye Excel Discussion (Misc queries) 7 January 24th 07 12:03 AM
how to open display the chart by clicking the cell in excel sheet shankar.s Charts and Charting in Excel 0 July 22nd 06 02:46 PM
Search open sheets in workbook and insert into open sheet punx77 Excel Discussion (Misc queries) 0 March 6th 06 05:07 PM


All times are GMT +1. The time now is 08:15 AM.

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

About Us

"It's about Microsoft Excel"