Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a program developed in VBA over EXCEL which does not have t
allow to open another session of itself, that is, if a user opens th book that contains the program, and once opened, he or she (the user tries to open the same book again, first of them (first sessio Workbook) does not have to allow to open the second one, all thi without disturbing the normal EXCEL operation with other EXCE workbooks. In other words, I want to allow the User to open the Workbook financial.xls only once at a time. (avoid reopen) Another explanation: How do I restrict the user to open a workbook only one time until it i closed? Thanks Marcelo -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Marcelo,
I'm not entirely clear what your question is. Excel automatically prevents the user from opening the same workbook twice (Excel can't have two files with the same name open). -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Marcelo " wrote in message ... I have a program developed in VBA over EXCEL which does not have to allow to open another session of itself, that is, if a user opens the book that contains the program, and once opened, he or she (the user) tries to open the same book again, first of them (first session Workbook) does not have to allow to open the second one, all this without disturbing the normal EXCEL operation with other EXCEL workbooks. In other words, I want to allow the User to open the Workbook: financial.xls only once at a time. (avoid reopen) Another explanation: How do I restrict the user to open a workbook only one time until it is closed? Thanks Marcelo. --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try thie:
Put a code in a WB and open it using the "recently opened files shortcut list at the bottom of the File menu. Something like this: Private Sub Workbook_Open() MsgBox IIf(Me.ReadOnly, "Hi, I'm ReadOnly", "Good Morning") End Sub Open this using File | Open, the macro does execute a 2nd time. I would like to avoid that. I want to avoid too the message taht arise when you try to open th opened workbook again : "TestBook.xls is alredy open. If you continu your data will be lost." or something like that (my Excel is i Spanish). Let me try to explain how my software works: I open my workbook, main UserForm appear with Excel Minimized and Invisibl (Excel.Application.Visible = False). At this point, if the user try to run a new session of this workboo the message above appear and let the user choose yes or not ( rerunnin the workbook damaging the data on the sheets worked by the user at thi time). I want is to avoid this, In other words, When the user try t run a new session of the workbook, nothing happend and the origina session remain intact. Thanks a lot. Marcel -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Reopen workbook | Excel Discussion (Misc queries) | |||
How to avoid opening an empty workbook every time I open a file? | Setting up and Configuration of Excel | |||
how to avoid duplicates in excel workbook? | Excel Discussion (Misc queries) | |||
Avoid Deleting a Shared Workbook using VBA | Excel Programming | |||
When workbook is closed tries to reopen?? | Excel Programming |