VBA allow edit only when sheet is copied

hajiali

Well-known Member
Joined
Sep 8, 2018
Messages
624
Office Version
  1. 2016
Platform
  1. Windows
Hello All I have a sheet (Master) where I have protected with password were I do not want anyone to change or modify. However, when sheet is copied and named as "today's Date" I want it to be unprotected so that it is changeable and can be modified.

Perhaps when someone attempts to change "Master" sheet it prompts user to copy sheet first.

Any suggestions
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
for anyone interested I was able to get it copied and unprotected and change to today's date using below code

Code:
Sub Copy_Unprotect_Sheet()    
    Sheets("MASTER").Select
    Sheets("MASTER").Copy After:=Sheets(10)
    Sheets("MASTER (2)").Select
    Sheets("MASTER (2)").Unprotect "PASSWORD USED"
    ActiveSheet.Name = Replace(Format(Now, "mm.dd.yyyy"), ":", "|")
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,243
Members
449,075
Latest member
staticfluids

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