Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
prevent second copy from opening
use this:
function isOpen(nameS as string) as boolean on error resume next dim nm as string nm="" nm=workbooks(nameS).name isOpen=(nm<"") end if you can check like this if isOpen("Mybook.xls") then msgbox "MyBook.xls is already open" else msgbox "MyBook.xls is closed, you must open it" end if Francisco Mariscal -----Original Message----- I have a workbook that uses the workbook_open event to call a procedure to create a menu. When I try to open a second instance of the workbook I get an error. It looks like the second workbook is trying to create the menu again (I am assuming there is a name conflict). Basically, is there a way to check if a workbook with the same name is already opened and if it is, do not try to open a new instance. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
prevent workbook opening if already open by someone else | Excel Discussion (Misc queries) | |||
How do I prevent excel from opening with a blank worksheet? | Excel Discussion (Misc queries) | |||
Prevent worksheet from opening in a workbook | Excel Worksheet Functions | |||
How to prevent any one from opening my workbook | New Users to Excel |