I have a sheet called "Adjustments"
I have tried to write code so that when a user creates a range name in the bar to the left of the formula bar or when sheet is selected, the sheet will be unprotected. There is no password used
Kindly check and amend my code
End Sub [/code]Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range) Dim ws As Worksheet Set ws = Sh If ws.Name = "Adjustments" Then rotect the sheet ws.Unprotect ' Check if the selected cell is within the range where you enter range names If Not Intersect(Target, ws.Range("B1:B2000")) Is Nothing Then End If End If End Sub
Bookmarks