Show' Read Only' On A Form

D

Dave

Hi,
I have a spreadsheet at work that loads a form at start up. The form
covers the whole of the screen, so therefore cannot see the spreadsheet.
Is there away to show via a label on the form, if the file as been opened in
read or read only? as the user sometime updates the spreadsheet via the form
but forgets they are in read only.

Please help

Dave
 
T

Tom Ogilvy

Private Sub Userform_Initialize()
If ThisWorkbook.ReadOnly Then
Userform1.Label1.Caption = "Workbook is Read Only"
Else
Userform1.Label1.Caption = "Workbook is editable"
End If
End Sub

Regards,
Tom Ogilvy
 

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

Top