Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
VB code to tell if my sheet is read-only
Hi
I want to run code only if the workbook is live (ie not read-only). I have set the workbook to advise users to open it read only but If they choose to open edit then I want to force a close after 2 hours ( I have the code for this). is this very simple? -- Kevin |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
VB code to tell if my sheet is read-only
Hi Kevin
Try this: Private Sub Workbook_Open() If Not ActiveWorkbook.ReadOnly Then 'your code to close the book in 2 hrs End If End Sub hth Carlo On Jan 10, 8:59*am, Kevin wrote: Hi I want to run code only if the workbook is live (ie not read-only). I have set the workbook to advise users to open it read only but If they choose to open edit then I want to force a close after 2 hours ( I have the code for this). is this very simple? -- Kevin |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA code to read formular from another cell | Excel Discussion (Misc queries) | |||
create a formula in one sheet that would read data from separate sheet automatically | Excel Discussion (Misc queries) | |||
How do I read this VBA code? | Excel Discussion (Misc queries) | |||
Need VBA Code to Open a Workbook in read only | Excel Discussion (Misc queries) | |||
how read data downloaded on cd-rw, now show only code? | New Users to Excel |