06-11-2018 10:30 AM
Hello!
The issue that i'm publishing may be obvious to you but i was struck with it
I have a sub VI that reads data from excel to get at the end the content of each sheet, when calling this sub VI in the main VI, I didn't understand why the control " Select a sheet" is disabled and can not display the sheets list in the excel file, although in the Sub VI they are displayed with no problem,
Please any hint would be helpful for me, you will find attached the VI
Thank you in advance
06-11-2018 10:56 AM
Please backsave (to 2016 at least). Also, you've only attached 1 VI, but you mention sub VI and main VI, so please attach both. Thank you
06-11-2018 12:21 PM
You've got a race condition. Select a sheet is not disabled, it just doesn't have anything in it. It won't until the CmbBox property node executes with whatever values come in from the global variables "Sheet Name". That global wasn't included, and you didn't include whatever VI writes sheet names to that global variable.
The race is that you have no dependency on when the control gets loaded with items vs. when the control is read and that name is sent to the subVI "Excel" (not included.)
Do a flowchart outlining all the steps you want your program to do. Then make sure you program it do them in that order.
06-12-2018 07:31 AM
I thank you so much for your reply
It works well when i used a global variable of the control " select a sheet" in the sub VI " excel" and then call this control in the main using also global var
Thank you a lot for you help