Hello:
I am trying to Hide certain data and calculation sheets in a workbook but still reference it in my code and macro buttons on other sheets. Is there a way to do this?
Thanks
Hello:
I am trying to Hide certain data and calculation sheets in a workbook but still reference it in my code and macro buttons on other sheets. Is there a way to do this?
Thanks
Do you need to hide the sheets using code?
There is no difference in the code between referring to a visible sheet vs. referring to a hidden sheet.![]()
Please Login or Register to view this content.
Thanks. When I tried entering the code
Worksheets("Data").Visible = False
there seems to be an error and it keeps highlighting the following line
Sheets("Data").Select
Thanks
Try the below code:
This code paste on the worksheet which you want to hide.. When a user click to unhidden the sheet the password prompt appears if user provide the correct password then the worksheet ( Data) will be visible other wise re hidden. For this code you have set the password on vba project too to protect the viewing of worksheet code.
Thanks![]()
Please Login or Register to view this content.
farrukh
Thanks. That is good to have. Is there a code to just hide the Data sheet and still use in my code. I am trying to remove some tabs that are not necessary for a user but still use it in code. When I paste the following in my code i am getting an error message:
Worksheets("Data").Visible = False
and it is highlighting the following:
Sheets("Data").Select
thanks
Regards, John55
If you have issues with Code I've provided, I appreciate your feedback.
In the event Code provided resolves your issue, please mark your Thread as SOLVED.
If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.
...enjoy -funny parrots-
Deleting it is not an option since I am referencing that sheet in other code. I just want to hide the sheet in the workbook and still refer to it in the code.
just try it according to the provided code
![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks