Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 440
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
File status = "read only" Barb Reinhardt Excel Programming 0 March 2nd 10 03:15 PM
EXCEL allow 2 options on status bar e.g. show "Count" + "Sum" LEJM Excel Discussion (Misc queries) 2 November 15th 07 07:49 PM
"Unable to Read File" error message in Excel - solutions? Presby Loaner Excel Discussion (Misc queries) 2 June 27th 07 05:09 PM
XCEL FILE REC'D AS READ ONLY -- HOW TO NOT BE "READ ONLY" billybob Excel Discussion (Misc queries) 1 February 13th 06 03:14 AM


All times are GMT +1. The time now is 10:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"