Workbook_open
-
-
-
Re: Workbook_open
This may be a silly question but, does sheet5 exist ?
What is the error message you are receiving ?
-
Re: Workbook_open
If it works in another spreadsheet.. I have no idea.
Try:
and see if any of them work. There's a link on ozgrid somewhere about the different ways to refer to specific sheets, I looked really fast but didn't find it. I'm sure someone has it bookmarked and will come along and give you the link soon if you can't find it
-
Re: Workbook_open
Thanks for your help. Sheet 5 does exist. What confuses me is that the exact same code works in another workbook but no in this one. What could affect this spreadsheet that blocks this code from working?
Daniel
-
Re: Workbook_open
Quote from DMariottiThanks for your help. Sheet 5 does exist. What confuses me is that the exact same code works in another workbook but no in this one. What could affect this spreadsheet that blocks this code from working?
Daniel
I'm just a rookie at this; but, I had a similar problem that I corrected by going to the sheet and going through the renaming process making sure there were no spaces on either end of the sheet name. -
-
Re: Workbook_open
Ken,
Thanks for you help. My sheet isn't called Sheet 5 as per the workbook tab. I am using the name Sheet5 as allocated by Excel in the VBA project window
Daniel
-
-
Re: Workbook_open
Tried that but no luck.
Daniel
-
Re: Workbook_open
Have you deleted any worksheets ?
-
Re: Workbook_open
No worksheets have been deleted
-
-
Re: Workbook_open
Can you post the workbook here so we can have a look at it(ensuring there is no personal or sensitive information in it)
-
Re: Workbook_open
Here it is
-
Re: Workbook_open
Just to confirm, when you open the workbook you want the worksheet "Valid" to be selected ?
This works for me when i open it, if it doesnt work for you, im not sure what the problem would be :confused:
-
Re: Workbook_open
Worksheet "Menu" should be selected as that is Sheet5.
-
-
-
Re: Workbook_open
Hi,
Open up VBE and delete your codeNow, still in VBE, select "Workbook" from the Code Window drop-down list. The default should be the Workbook Open event.
Type "Sheet5.Select"
Save and open up again.This is what I did with your sample file and I got it to work perfectly.
-
Re: Workbook_open
Quote from DMariotti
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!