Show if worksheet is Read Only or not

P

Patric

Hi,

Does anyone have a suggestion how to show in Excel XP
for the user if they have opened a worksheet in
Read Only mode or not?

Best regards
 
I

icestationzbra

if i understand your question properly, i think you want to know if th
sheet is protected or not.

for that, i think you could use the following code in VBA.

Private Sub Worksheet_Activate()

If Me.ProtectContents = True Then
MsgBox "Protected"
Else
MsgBox "UnProtected"
End If

End Sub

you can insert this code into the worksheet's code module by hittin
Alt+F11 and pasting it there
 
A

AlfD

Hi!

If you are referring to the read-only property of the file, my Exce
puts [Read only] after the file name in the top line of the screen.

Al
 
Top