Prevent Deletion of Sheet BUT ALLOW Hide/Unhide

yorkbay

New Member
Joined
Feb 7, 2021
Messages
18
Office Version
  1. 2013
Platform
  1. Windows
Hi - I'm stuck and need an assist.
I have a very complex workbook that I cannot protect as protection interferes with my VBA code for hidden\unhidden sheets during execution of code.
I do have protected sheets that allow selection of both locked and unlocked cells but prohibit copy/paste etc. on individual sheets.
My VBA code hides and unhides various sheets (15 total) throughout the user experience - I do NOT want the user to be able to rename or delete any of these.
The code also allows the user to 'run report' which creates a new sheet and names the sheet with todays date and time
For these 'report' sheets (for which I will never know the name), I want to allow the user to rename or delete as necessary WHILE protecting the other sheets in the workbook to not be able to be deleted or renamed yet still allow them to be hidden/unhidden while code runs. I would appreciate the assist. Thanks in advance.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Allow Hide Sheet but Disable Delete Sheet
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0

Forum statistics

Threads
1,215,020
Messages
6,122,712
Members
449,093
Latest member
Mnur

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top