Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
auto closing a work book
is there a program that can be written that will close a workbook and make it
read only at a certain time and then reopen it at another specified time? I am runing office and window xp professional. thanks in advance for any help!! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
auto closing a work book
To make a workbook readonly (or make a readonly workbook write) you
don't need to close it. Just use: Sub MakeWorkbookReadonly() 'you may like to check whether the user should save their work If not thisworkbook.readonly then _ thisworkbook.ChangeFileAccess Mode:=xlReadOnly End sub Sub MakeWorkbookWrite() If thisworkbook.readonly then _ thisworkbook.ChangeFileAccess Mode:=xlReadwrite End sub To do this at a certain time is a little trickier. One way is to set OnTime procedures, say at workbook open. I would play with various methods and see which one works best for you. Sub SetModeSwitching() Application.OnTime TimeValue("15:00:00"), "MakeWorkbookReadonly" Application.OnTime TimeValue("16:00:00"), "MakeWorkbookWrite" End Sub HTH, Gareth myssieh wrote: is there a program that can be written that will close a workbook and make it read only at a certain time and then reopen it at another specified time? I am runing office and window xp professional. thanks in advance for any help!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Running Total, Opening & Closing Acct Balance in Cash Book | Excel Worksheet Functions | |||
No need of save change confirmation at closing book | Excel Discussion (Misc queries) | |||
auto numbering an exel work book sheet everytime it opens or print | Excel Discussion (Misc queries) | |||
Is there away to keep "auto save" from jumping to the first work sheet in the work book? | New Users to Excel | |||
simultaneously work in a work book with other users | Excel Discussion (Misc queries) |