Hi all
This code was posted in answer to my original question some time ago.
However, the OP now wants the password to be confirmed to eliminate mistakes.
Can someone help with the appropriate lines please

Sub protection()
Dim PW As String
Dim S As Integer
PW = InputBox("Enter password:")
For S = 1 To ActiveWorkbook.Worksheets.Count
Worksheets(S).Protect Password:=PW
Next
End Sub

Regards
Michael Mitchelson