code shown below can open a excel file in seprate excel instance. But is it possible to to check whether this file is already opened and if so just show the opened file to the user?
code
/codePlease Login or Register to view this content.
code shown below can open a excel file in seprate excel instance. But is it possible to to check whether this file is already opened and if so just show the opened file to the user?
code
/codePlease Login or Register to view this content.
Last edited by vlady; 01-07-2014 at 03:13 AM.
Hi, BB code tags must be wrapped in brackets like this -> [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code]
Try this
Please Login or Register to view this content.
多么想要告诉你 我好喜欢你
Hi Millz,
Thanks for your reply. But it didnt work, new copy of Non-Conformity Tracking file is opened every time i click the 'ButtonMaster' button.
Regards,
Mekha
It works when I tested. Didn't work for you probably because you already have 2 Excel applications running. Try closing all instances of Excel and run again.
If you are running this code in Excel itself, you don't need to use Excel.Application.
Please Login or Register to view this content.
Hi Millz,
Thanks for your reply.
the latest code that you provided can identitfy whether "Non-Conformity Tracking" file is already open but this time if it not open it will open the file in same excel instance. But my objective is to open it in different excel instance since the macro used to open "Non-Conformity Tracking" will still be running in another excel and i can continue run that to complete my tasks. By doing this user can work with both the file simultaneously.
Any suggestions?
Regards,
mekha
If you must really run it in a separate instance of Excel, then I guess I am unable to help further. I am unsure of how to "grab" the other instance and reference it.
Maybe someone else can help you.
See if you can use this...
It looks complicated. I am very new to VBA. Anyway let me check whether i can understand this.
Sometimes complication is necessary.
The code has been revised slightly and a test procedure added (Sub Test, naturally). Copy all the following into a new module.
Start a new instance of Excel and load your Non-Conformity Tracker workbook in that instance. Change the search strings in Sub Test to match and step through it using F8
Just in case, a simple example... run after loading the non conformity tracker in another instancePlease Login or Register to view this content.
Please Login or Register to view this content.
Last edited by cytop; 01-07-2014 at 06:08 AM.
It worked.. Thanks you so much.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks