Ok in that case can I open the workbook using vba and then determine which worksheets are password protected and then close the workbook again using vba code?No, not really, you could check using VBA at the workbook_open event, but I think that's about it !
Sub Workbook_Open()
Dim sh As String, ws As Worksheet
For Each ws In Worksheets
If ws.ProtectContents = True Then
sh = sh & " " & ws.Name
End If
Next ws
MsgBox "The Following Sheets are Protected !!" & sh
ActiveWorkbook.Close savechanges:=False
End Sub
Many thanks.Maybe this way
VBA Code:Sub Workbook_Open() Dim sh As String, ws As Worksheet For Each ws In Worksheets If ws.ProtectContents = True Then sh = sh & " " & ws.Name End If Next ws MsgBox "The Following Sheets are Protected !!" & sh ActiveWorkbook.Close savechanges:=False End Sub