05-14-2009 05:28 PM
05-15-2009 08:29 AM
As you probably know, nothing "bad" happens when you open Excel if it's already open, it just doesn't come to the front of your LabVIIEW ap. To get it to the front, Minimize the Excel window then immediately Maximize it (or Normalize it) programmatically with a PN. I have tried many of the other methods (but not all of them) to no avail, this works for me. There may be a more elegant solution.
There are other known methods to bring an ap to the front, with callbacks etc, but they can be clunky, or require Userlib32, etc. Since this property node already exists in your ap, it's comes at little expense.
Of course, you may want to check that the ap was open before you do this, but even that is optional, at the expense of a little flashing on the screen.
05-19-2009 01:42 PM
Thanks for the response. My problem is that my customer does not want to see the warning message that I am trying to open a workbook that is already open. I need a way to recognize that it is open, then either add data to it. OR close it, reopen it, then add data to it. How can I check to see if a specific workbook is open?
Steve
05-19-2009 02:12 PM
05-19-2009 03:11 PM
Well done smercurio.
I looked through the methods, and there's just nothing directly related to an IsOpen type VB function.
I guess you could also do a known safe method on the open workbook and look for an error?
05-19-2009 04:55 PM
Broken Arrow wrote:I guess you could also do a known safe method on the open workbook and look for an error?
That would also work.