LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Check if excel workbook open ActiveX and obtain workbook reference

Solved!
Go to solution

If the workbook is open, then you make it active..

If the workbook is not open, then you would open it and make it active.

To open a workbook or to make a workbook active, you need to use the Invoke Node.

A workbook is essentially the Excel file.

 

0 Kudos
Message 11 of 14
(786 Views)

@nyc_(is_out_of_here) wrote:

If the workbook is open, then you make it active..

 

 


I may not be explaining this well.  The problem I am having is how to make a specific open workbook the active one.  I can only find the ActiveWorkbooks or ActiveSheets property under the Application reference, and these are writes not reads.  How do I tell it to make a specific open workbook the active one?  If I use the Activeworkbooks or Activesheets property it just selects the workbook that was last active.  I want the program to make a specific workwook active.  

0 Kudos
Message 12 of 14
(778 Views)

If you absolutely certain that the workbook is open, then just activate it with an Invoke Node. That makes it Active.

You should go back and look at whatever VI you are using and understand what is happening.

 

Properties are not the way to go.

LabVIEW's ActiveX Invoke Node which translates to Methods are the way to go.

 

0 Kudos
Message 13 of 14
(770 Views)

 


@nyc_(is_out_of_here) wrote:

 

Properties are not the way to go.

LabVIEW's ActiveX Invoke Node which translates to Methods are the way to go.

 


I have also tried the invoke node but I get an undefined error.  When i research the error it appears to be a Microsoft Office issue.  Unfortunately this program will need to be able to operate on many laptops all running various versions of Windows..

 

EDIT: Actually, it now works.  Hopefully this will be true for all our computers.  Thanks

0 Kudos
Message 14 of 14
(757 Views)