Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have a Excel document that contains multiple worksheets.
When I open the document, I want it to always open with a particular worksheet displayed (rather than the one displayed when I last saved the document). How do I achieve this please? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Private Sub Workbook_Open()
Thisworkbook.Worksheets("sheet_name").Activate End Sub This is workbook event code. To input this code, right click on the Excel icon on the worksheet (or next to the File menu if you maximise your workbooks), select View Code from the menu, and paste the code -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "SomeHelp" wrote in message ... I have a Excel document that contains multiple worksheets. When I open the document, I want it to always open with a particular worksheet displayed (rather than the one displayed when I last saved the document). How do I achieve this please? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks for your reply Bob.
However I've entered the code as you described (replacing ''sheet_name'' with my sheet name - i've tried with and without quotation marks & brackets) & it hasn't worked. Any suggestions please? -- SomeHelp "Bob Phillips" wrote: Private Sub Workbook_Open() Thisworkbook.Worksheets("sheet_name").Activate End Sub This is workbook event code. To input this code, right click on the Excel icon on the worksheet (or next to the File menu if you maximise your workbooks), select View Code from the menu, and paste the code -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "SomeHelp" wrote in message ... I have a Excel document that contains multiple worksheets. When I open the document, I want it to always open with a particular worksheet displayed (rather than the one displayed when I last saved the document). How do I achieve this please? |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
What does doesn't work mean, it errors, the same sheet as you closed with is
active? Post your EXACT code, and the EXACT names of your worksheets please. -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "SomeHelp" wrote in message ... Thanks for your reply Bob. However I've entered the code as you described (replacing ''sheet_name'' with my sheet name - i've tried with and without quotation marks & brackets) & it hasn't worked. Any suggestions please? -- SomeHelp "Bob Phillips" wrote: Private Sub Workbook_Open() Thisworkbook.Worksheets("sheet_name").Activate End Sub This is workbook event code. To input this code, right click on the Excel icon on the worksheet (or next to the File menu if you maximise your workbooks), select View Code from the menu, and paste the code -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "SomeHelp" wrote in message ... I have a Excel document that contains multiple worksheets. When I open the document, I want it to always open with a particular worksheet displayed (rather than the one displayed when I last saved the document). How do I achieve this please? |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Bob,
'Doesn't work' tends to mean it is doing the same thing it was before I asked for assistance Ie, Opening on the same worksheet that I was on when I save the document. However I've worked it out, and unfortunately you didn't tell me one detail that would have made your suggestion work. This was to change the drop-down menu from 'General' to 'Worksheet' in the VisualBasic (View code) window, and then paste the code. Thanks for your help with this. It is much appreciated. Regards Ian -- SomeHelp "Bob Phillips" wrote: What does doesn't work mean, it errors, the same sheet as you closed with is active? Post your EXACT code, and the EXACT names of your worksheets please. -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "SomeHelp" wrote in message ... Thanks for your reply Bob. However I've entered the code as you described (replacing ''sheet_name'' with my sheet name - i've tried with and without quotation marks & brackets) & it hasn't worked. Any suggestions please? -- SomeHelp "Bob Phillips" wrote: Private Sub Workbook_Open() Thisworkbook.Worksheets("sheet_name").Activate End Sub This is workbook event code. To input this code, right click on the Excel icon on the worksheet (or next to the File menu if you maximise your workbooks), select View Code from the menu, and paste the code -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "SomeHelp" wrote in message ... I have a Excel document that contains multiple worksheets. When I open the document, I want it to always open with a particular worksheet displayed (rather than the one displayed when I last saved the document). How do I achieve this please? |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
'Doesn't work' tends to mean it is doing the same thing it was before
I asked for assistance Really, thanks for letting us know what "Doesn't work" means Ie, Opening on the same worksheet that I was on when I save the document. However I've worked it out, and unfortunately you didn't tell me one detail that would have made your suggestion work. This was to change the drop-down menu from 'General' to 'Worksheet' in the VisualBasic (View code) window, and then paste the code. If you had copied and pasted the code correctly, General would automatically changed to Workbook meaning it is not necessary to first select Workbook from the dropdown, so in fact Bob gave you correct information but you either misunderstood or handled it incorrectly. The error was between the chair and the PC. Have a nice day! -- Regards, Peo Sjoblom He told you to |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Peo,
Before you send such a response, please check the full thread. Bob's last email to me was the one which started being patronizing. Bob, if anything, had started to complicate the issue by asking what was shown. Well it didnt take a lot of thought to realise that 'doesn't work' means it was doing the same thing when I asked for assistance. I work in IT and realise that exact details are important, however sometimes you need to let common sense prevail and not over complicate things. Anyway, I did exactly follow Bob's instructions, by both typing & cut & pasting (but of course changing the worksheet to mine) the code into View Code window but it did not work. Don't want to dwell on this any longer so please consider this the last communication. Thanks for both Bob's & your time on this. Regards Ian -- SomeHelp "Peo Sjoblom" wrote: 'Doesn't work' tends to mean it is doing the same thing it was before I asked for assistance Really, thanks for letting us know what "Doesn't work" means Ie, Opening on the same worksheet that I was on when I save the document. However I've worked it out, and unfortunately you didn't tell me one detail that would have made your suggestion work. This was to change the drop-down menu from 'General' to 'Worksheet' in the VisualBasic (View code) window, and then paste the code. If you had copied and pasted the code correctly, General would automatically changed to Workbook meaning it is not necessary to first select Workbook from the dropdown, so in fact Bob gave you correct information but you either misunderstood or handled it incorrectly. The error was between the chair and the PC. Have a nice day! -- Regards, Peo Sjoblom He told you to |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I am sorry, but there was nothing patronising about my response. I was just
being precise because as responders we have no idea how knowledgeable the OP is, how capable they are, or anything. I give my time freely, so I want to mitigate that time usage, and it saves time and back and forth responses. And you said change the drop-down menu from General to Worksheet. The code I gave was workbook code, there is no Worksheet in that module to select. So, either you were being imprecise, or you did it wrong. -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "SomeHelp" wrote in message ... Peo, Before you send such a response, please check the full thread. Bob's last email to me was the one which started being patronizing. Bob, if anything, had started to complicate the issue by asking what was shown. Well it didnt take a lot of thought to realise that 'doesn't work' means it was doing the same thing when I asked for assistance. I work in IT and realise that exact details are important, however sometimes you need to let common sense prevail and not over complicate things. Anyway, I did exactly follow Bob's instructions, by both typing & cut & pasting (but of course changing the worksheet to mine) the code into View Code window but it did not work. Don't want to dwell on this any longer so please consider this the last communication. Thanks for both Bob's & your time on this. Regards Ian -- SomeHelp "Peo Sjoblom" wrote: 'Doesn't work' tends to mean it is doing the same thing it was before I asked for assistance Really, thanks for letting us know what "Doesn't work" means Ie, Opening on the same worksheet that I was on when I save the document. However I've worked it out, and unfortunately you didn't tell me one detail that would have made your suggestion work. This was to change the drop-down menu from 'General' to 'Worksheet' in the VisualBasic (View code) window, and then paste the code. If you had copied and pasted the code correctly, General would automatically changed to Workbook meaning it is not necessary to first select Workbook from the dropdown, so in fact Bob gave you correct information but you either misunderstood or handled it incorrectly. The error was between the chair and the PC. Have a nice day! -- Regards, Peo Sjoblom He told you to |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I create a meesage to display when opening Excel | Excel Discussion (Misc queries) | |||
Excel 2003 - Toggle formulae display ON/OFF on worksheet | Excel Discussion (Misc queries) | |||
opening excel files from access 2003, win xp, office 2003 | Excel Discussion (Misc queries) | |||
How can I display a message when opening an Excel File? | Excel Discussion (Misc queries) | |||
Display a message when opening Excel file | Setting up and Configuration of Excel |