Hi there,

Can anyone spot why this code doesn't work. It runs, but will not accept the password I set, which for testing was a simple lower case "hello" placed in A1 on sheet 4.

Private Sub Button2_Click()
    Dim Pswd As String
    Pswd = Sheet4.Cells(1, 1)
    
    Sheet1.Protect Password:=Pswd, UserInterFaceOnly:=True
End Sub
Kind regards

Rob