PhilW_34
Board Regular
- Joined
- Jan 4, 2007
- Messages
- 128
- Office Version
- 365
- Platform
- Windows
Hello,
I have code on "Sheet X" which hides other sheets based on a drop-down menu in cell H13. This code works great. (Private Sub worksheet_change(ByVal target As Excel.Range))
What I need to be able to do us run more code on another tab which has to first unhide all hidden sheets before it executes the rest of the code. I can do this too. However, once that code is completed, I want to once again hide these tabs based on the contents of "Sheet X" cell H13.
Basically, I want to call a private sub routine but I can't. I've tried selecting that sheet and then running the worksheet_change code and that doesn't work.
I know I'm being vague here. Ultimately, how can I re-run a private sub worksheet_change routine without manually going to that sheet and selecting that cell? I've tried calling it and using Application.Run and neither work. I get a function not defined error.
Any ideas would be appreciated. Thanks.
Phil
I have code on "Sheet X" which hides other sheets based on a drop-down menu in cell H13. This code works great. (Private Sub worksheet_change(ByVal target As Excel.Range))
What I need to be able to do us run more code on another tab which has to first unhide all hidden sheets before it executes the rest of the code. I can do this too. However, once that code is completed, I want to once again hide these tabs based on the contents of "Sheet X" cell H13.
Basically, I want to call a private sub routine but I can't. I've tried selecting that sheet and then running the worksheet_change code and that doesn't work.
I know I'm being vague here. Ultimately, how can I re-run a private sub worksheet_change routine without manually going to that sheet and selecting that cell? I've tried calling it and using Application.Run and neither work. I get a function not defined error.
Any ideas would be appreciated. Thanks.
Phil