Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
chart error message / work sheet not open ? | Charts and Charting in Excel | |||
why, when i open a work sheet does a blank sheet open as well | Excel Discussion (Misc queries) | |||
When I open Excel I want it to open on Sheet 1 | Excel Discussion (Misc queries) | |||
how to open display the chart by clicking the cell in excel sheet | Charts and Charting in Excel | |||
Search open sheets in workbook and insert into open sheet | Excel Discussion (Misc queries) |