View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Clearly identifying a read only file

I would take a different approach, as the colouring might be distracting all
the time. I would throw up a message box say every 15 minutes

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.OnTime nTime, "GiveMessage", , False
End Sub

Private Sub Workbook_Open()
If ThisWorkbook.ReadOnly Then
Call GiveMessage
End If
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code

and in a normal code module add

Public nTime As Double

Sub GiveMessage()
MsgBox "This file has been opened as read only"
nTime = Now + TimeSerial(0, 15, 0) '15 mins
Application.OnTime nTime, "GiveMessage"
End Sub

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"PaoloScaglioni"
<PaoloScaglioni.2a3sfn_1151483104.4013@excelforu m-nospam.com wrote in
message news:PaoloScaglioni.2a3sfn_1151483104.4013@excelfo rum-nospam.com...

I have a spreadsheet used by different people during the day. One person
uses the file live whilst the others use read only versions. I dont want
different users accessing the file at the same time but I would like the
"read only" users to clearly see they are using a read only file. How
can I automatically have excel colour all the cells when it opens a
file as read only?
Thanks
Paolo


--
PaoloScaglioni
------------------------------------------------------------------------
PaoloScaglioni's Profile:

http://www.excelforum.com/member.php...o&userid=35020
View this thread: http://www.excelforum.com/showthread...hreadid=556360