Dim objXL, strMessage On Error Resume Next Set objXl = GetObject(, "Excel.Application") If Not TypeName(objXL) = "Empty" then strMessage = "Excel Running" Else strMessage = "Excel NOT Running" End If MsgBox strMessage, vbInformation, "Excel Status"
Hi thank you very much. It really brings me closer to what I'm looking for, much closer to a solution. Let me tell you my exact requirement / question: Actually, my problem is that with Java I try to find an Excel instance with a specific workbook name, but I did not return the Excel instance, even if it appears. In my case, I have Excel open with two books, Book1 and Book2. When I try to find Excel with any of these book titles, I did not get any result. To narrow this problem, this problem is observed only on one of my client machines. On rest computers, the same Java code works fine. It started after uninstalling Excel2010 and installing Excel2007.
So what I'm trying to do is that you want to create one vbscript where I can specify the name of the workbook as input, and it will return to me if there is an Excel instance working with the given title of the book.
Hey, please direct me further to creating such a script where I will give the name of the book, and the script will find out if this Excel instance works or not. Not a problem, even if the name of the workbook is passed as hard input to the script. I will change according to the name of my book.
Thanks for your previous answer and expect this too .. :))
source share