disable popup enter password

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Disable popup to enter Password to unprotect sheet | Excel forum

Disable popup to enter Password to unprotect sheet | Excel forum

resolvedResolved · High Priority · Version 2016

Tsudoi has attended:
Excel PowerPivot course
Excel VBA Introduction course

Disable popup to enter Password to unprotect sheet

Hi,
I have a file that has the following code which triggers a popup to enter enter Password to unprotect sheet when the file opens. I'd like to stop this popup from appearing ever time the file opens but still keeping the protection valid. I simply don't want the popup to prompt. How can I change the code to achieve that please?




Option Explicit

Private Sub Workbook_Open()

Application.Goto Sheets("Read Me").Range("A1:W58"), True

With Worksheets("1. Template")
.EnableOutlining = True
.Protect UserInterfaceOnly:=True
End With

End Sub


RE: Disable popup to enter Password to unprotect sheet

Hi Tsudoi

If you check the link I sent you in your original forum request it provides examples for the code for protecting and unprotecting the worksheet.


https://www.thespreadsheetguru.com/the-code-vault/groups-expand-collapse-sheet-password-protection

'Password Protect Current Sheet
ActiveSheet.Protect Password:="", UserInterfaceOnly:=True

'Unprotect Sheet
ActiveSheet.Unprotect ""

Regards

Dennis

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

How to Remove Duplication's from a selection of data in an Excel 2010 Worksheet

It would take far too much time to scan through rows and rows of data to find and remove duplicate data. So, here's how to do this using a much more efficient method:-

1) Select the data that might contain duplication's
2) Click the ''Data'' tab
3) Go to ''Data Tools'' and click ''Remove Duplicates''
4) A box will appear. Tick the boxes of the columns that you want to use to check for duplicates. Finally, click ''OK.''

View all Excel hints and tips


Server loaded in 0.05 secs.