Sub ClearPassword() Dim myWorkbook As Workbook, pass As String Set myWorkbook = ThisWorkbook If myWorkbook.HasPassword Then myWorkbook.Password = "" Debug.Print "Password removed." Else Debug.Print "No password found." End If End Sub