Clear password : Workbook Password « Excel « VBA / Excel / Access / Word






Clear password

 
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

 








Related examples in the same category

1.Write Password
2.Set Workbook Password