HasPassword Property Example
This example displays a message if the active workbook has a protection password.
If ActiveWorkbook.HasPassword = True Then MsgBox "Remember to obtain the workbook password" & Chr(13) & _ " from the Network Administrator." End If