Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable the opening of another workbook
Dear all, I just would like to know how could I prevent the opening of second workbook while the first workbook is opened or in using. Great thanks!
|
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable the opening of another workbook
Hi DDLY;
Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.OnWindow = "" End Sub Private Sub Workbook_Open() Application.OnWindow = ThisWorkbook.Name & "!ThisWbkOnly" End Sub In a standard module: Sub ThisWbkOnly() If Not ActiveWorkbook.Name = ThisWorkbook.Name Then ActiveWorkbook.Close False MsgBox "This session of Excel is reserved for the " & ThisWorkbook.Name & " !" End If End Sub MP "DDLY" a écrit dans le message de ... Dear all, I just would like to know how could I prevent the opening of second workbook while the first workbook is opened or in using. Great thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I stop blank workbook from opening when opening an existing | Excel Discussion (Misc queries) | |||
How to disable General formatting when opening CSV | Excel Discussion (Misc queries) | |||
how to disable always ask before opening this type of file | Excel Discussion (Misc queries) | |||
Disable macros on a programmatically opening .xls file | Excel Discussion (Misc queries) | |||
disable menus on opening Excel | Excel Programming |