File status = "read only"
Ryan,
Thanks for your reply.
I was a bit unclear in my post. I meant when a user uses the 'toggles read
only' button on the 'file' toolbar. That's when I would like the worksheets
to go grey making it obvious it is read only.
Thanks,
--
Traa Dy Liooar
Jock
"Ryan H" wrote:
Put this in the ThisWorkbook module. This code will fire each time the
workbook is opened. Hope this helps! If so, let me know, click "YES" below.
Private Sub Workbook_Open()
If ThisWorkbook.ReadOnly Then
MsgBox "This workbook is Read Only", vbExclamation
' turn cells light grey
Sheets("Sheet1").Cells.Interior.ColorIndex = 15
End If
End Sub
--
Cheers,
Ryan
"Jock" wrote:
On occasion, users have 'forgotten' they are in a WB as 'read only' and then
have to re-enter the data when they go back in with read/write access.
Using VBA, is it possible to put something like:
If WB file status = read only
then sheet1.entire range.cell colour = light grey
else
end if
?
This would make it obvious to anyone using it whether it was read only or not.
Thanks.
--
Traa Dy Liooar
Jock
|