I haven't checked, but should it be: If ActiveWorkbook.HasPassword = True Then instead?
If ActiveWorkbook.HasPassword = True Then
Forum Rules