Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Userform entry on a Password protected worksheet

0

I'm using a userform to input data into a second sheet (database). I need the database to be protected to prevent users from editing the formulas.

I tried the " ActiveSheet.Unprotect:="Password" " but it doesnt work.

I have also tried the sheet name: HearingAids.Unprotect:="Password" without success.

Password: AD2022

Answer
Discuss

Answers

0
Selected Answer

Hi Aletia and welcome to the Forum

If you have a worksheet already protected with the password AD2022, unlock it using:

ActiveSheet.Unprotect Password:="AD2022"
but you can omit theĀ Password:= bit). Better to specify the sheet, so:
Worksheets("HearingAids").Unprotect "AD2022"

Similarly, to re-appy the protection, use:

Worksheets("HearingAids").Protect "AD2022"

Hope this helps.

Discuss


Answer the Question

You must create an account to use the forum. Create an Account or Login