98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum 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
Resolved · 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 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
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 WorksheetIt 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:- |