Show if worksheet is Read Only or not

  • Thread starter Thread starter Patric
  • Start date Start date
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
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top