[quote name='HansV' post='799165' date='21-Oct-2009 18:44']What exactly do you want to accomplish?[/quote]
In a wb, some columns, say A to Z are used as data field & Col. AA to AE are used as summary. The wb is protected & for review purpose, I keep the data fields hidden. With the help of above code, users are allowed to format col./rows as required. I want to restrict the users to format the summary portion only, if possible.

You can make it a bit more diffcult to unhide rows / columns by not allowing users to select locked cells. But I don't think you can prevent it entirely. If you really want that, you shouldn't allow users to format rows and columns.

[quote name='HansV' post='799171' date='21-Oct-2009 19:09']You can make it a bit more diffcult to unhide rows / columns by not allowing users to select locked cells. But I don't think you can prevent it entirely. If you really want that, you shouldn't allow users to format rows and columns.[/quote]
Thanks Hans but as I stated, it is *NOT* necessarily required to hide particular columns & the code is perfect without any further modification. I was looking for the possibility of avoiding any mis-presentation but that can be taken care of without amending the code. (After all, the users are equally responsible for any (mis) presentation of data.)

[quote name='prasad' post='799304' date='22-Oct-2009 10:02']Thanks Hans but as I stated, it is *NOT* necessarily required to hide particular columns & the code is perfect without any further modification. I was looking for the possibility of avoiding any mis-presentation but that can be taken care of without amending the code. (After all, the users are equally responsible for any (mis) presentation of data.)

Thanks again.[/quote]

Pl have a look :

[codebox]Sub unhide()
For Each sht In ActiveWorkbook.Sheets
On Error Resume Next
sht.Unprotect
If Err Then
MsgBox "Password incorrect. Please try again.", vbExclamation
sht.Unprotect
If Err Then
MsgBox "Sorry! better luck next time", vbExclamation
End If
End If
On Error GoTo 0
Next sht
Dim strName As Variant
For Each strName In Array("BG3", "SSC", "MUFFLER", "FRAME", "RIM", "HRD", "PNG", "ANS")
With Worksheets(strName)
.Columns("A:AP").Hidden = False
.Select
.Range("A1").Select
End With
Next
Sheets("Key Ratio ").Select
Range("A3").Select
End Sub[/codebox]

1) if I hit the <Esc> OR press cancel button instead of supplying the password, the code unprotect the sheet & jump to next sheet.

2) It is more convenient for me to unprotect all sheets in array in single attempt, instead of supplying password for each sheet one by one.

3) If I supplied correct password on second attempt, the code unprotect the sheet but msg still flashes.

Sorry if it sounds irretating but I have not tested the code this way before.

[quote name='HansV' post='799520' date='23-Oct-2009 18:05']Do you need the user to supply the password to unprotect the sheets, or would it be OK to include the password in the code (like you do in the code that protects the sheets)?[/quote]
Yes, users are required to supply the password only once to unprotect all protected sheets.