Forum Discussion

Frank Drucker's avatar
Frank Drucker
Copper Contributor
Aug 11, 2020
Solved

Macro to Include Password

I want to create a macro that will protect and unprotect a sheet with a password.   I tried to "record" a macro that had a password but the resulting macro had none.    
  • SqueakySneakers's avatar
    Aug 11, 2020
    Sheets("sheet1").Select ActiveSheet.Protect Password:="" Sheets("sheet1").Select ActiveSheet.Unprotect Password:="" Change Sheet1 to the name of your sheet. If you want an actual password, place it in the "".

Resources