Could someone look into this VI for me?
What this VI is supposed to do is detect of Excel is open, grab what Workbooks are available, and then display them in a listbox. It works as a stand-alone program but my problem is I cannot select any item in the listbox when the VI is called. What am I missing here? VI is in LV 2016.
Solved! Go to Solution.
With your Front Panelpen method, you need to wire a TRUE to the Activate input. It defaults to FALSE, which means it will not open your front panel.
That doesn't seem to matter. I am still experiencing the same behavior as before. The SubVI acts like it is in a locked state and I cannot select anything.
It works just fine for me. Do you have the subVI open before running the calling VI? Can you attach a calling VI that causes this issue?
Run the StepperMotor.vi - that is the main VI. I have left it out in this example but you can plunk the GetExcelWBRef.vi in there.
Just as I suspected. Your top level VI is set up to be "Modal". This means it will be in front of any other VIs. Your subVI is "default", which is basically the same as "floating". I recommend you change your main VI to be "Floating".
I've also been looking at this. I was a little confused looking at the first VI you posted, wondering (a) why you weren't using the RGT and Excel Objects, (b) how this VI was called, and (c) how some of the input references were being defined.
Now that I see the other files included in the Zip, I'm still puzzled. GetExcelWBRef doesn't seem to be called anywhere.
I suppose if you never use it, it doesn't really matter if it works, or not ...
P.S. -- a suggestion for Enums used as State Names. Change the name of the Enum to something like "State" (instead of Control 1). Also, if you arrange the States in the order they are likely to be called, you can "Rearrange Cases" of your State Machine and use the Sort option, which really helps in "walking through" the code.