LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview to push a button in excel

Solved!
Go to solution

When desperate and all the other methods have failed you can try the Application.SendKeys method.

Here in the following example I want to activate the Create PDF button of the Acrobat tab. If you press and hold the ALT key you will see letters and numbers appear:

ScreenShot035.jpg

So to activate the Acrobat tab I need to press ALT+B, here is the Acrobat tab:

ScreenShot036.jpgAs you can see letters and numbers are still active: So to activate Create PDF I need to press C.

So the desired key combination is: ALT + B C. Pressing the ALT key again will deactivate the letter/number display.

In code the key combination will be: "%BC%" where % represent the ALT key.

Here is the code in LabVIEW:

Using SendKeys.png

You can get more details on the SendKeys method here.

Ben64

 

 

Message 11 of 14
(1,395 Views)

Dear Ben,

 

thanks for the help, it looks feasable. Can you please send me the labview VI (you only attached an image and some of the functions you used I do not know and it is difficult to find them...)

0 Kudos
Message 12 of 14
(1,344 Views)
Solution
Accepted by topic author fabbro12

@fabbro12 wrote:

Dear Ben,

 

thanks for the help, it looks feasable. Can you please send me the labview VI (you only attached an image and some of the functions you used I do not know and it is difficult to find them...)


The image is a snippet, if you drag and drop it in a block diagram it will recreate the vi. Anyway, attached is the vi. You will have to determine the correct key combination to activate the Sekonic tab and the Measurement Start button.

 

Ben64

Message 13 of 14
(1,333 Views)

Thanks BEn,

 

even if I could not recover your VI (I use LV 2014 and you did on LV 2015), from the icons I was able to do it myself and it works now.


Even if it is not an optimized solution (I am obliged to keep the excel file active while running the LV VI), in this way I will be able to get the results I need in a short time!

Thanks 

0 Kudos
Message 14 of 14
(1,322 Views)