• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Runing Macro on hidden sheets

Nani Ram

New Member
Hi All,

I have created a template in that i have specified few macro enabled text boxes to redirect to the particular sheets (like sheet14, sheet15..etc) and i want to hide all those sheets and i did that.

But when i click the macro enabled text boxes in the sheet1, it gives me below error:

-[Run-time error '1004':
Select method of worksheet class failed]-

is it possible to show only sheet 1 with macro enabled text boxes and hide remaining worksheets? Any options for it...please help me.


Thank You
- Nani Ram
 
HI @Nani Ram

If you are using VBA to redirect to a hidden sheet, say to cell "A1" in sheet "sheet14", you must first show/activate the sheet you wish to go to.

Try:
Code:
Sheets("sheet14").Visible = True
Sheets("sheet14").Activate
Sheets("sheet14").Range("A1").Select
 
Back
Top