View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Jon Peltier Jon Peltier is offline
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