I'm trying to make a listbox where the options are dependent on another variable in my worksheet. If my variable n.sec is smaller than 3, I want the list box to only have the option "N/A". Otherwise I would like it to display a list of options.
I'm having a hard time understanding the vb script language, and haven't been able to find a simple tutorial to get me started in using it in mathcad. I hope someone can give a solution to my problem, which I believe must be pretty simple, but I just can't crack.
Thanks in advance
I've been looking through the collection, and tried to create the options from an input variable (which I programmed to give the different options dependent on my variable n.sec). Was not able to get this to work though.
My new approach would be to have my variable n.sec (which can only have a single value of 3, 4 or 5) as an input to my control, and then in the string input have something like this:
This doesn't work though (some wrong syntax in the Inputs(1).Value>3 part. Can the change in the listbox options be implementet in this way (with the right syntax)?
Solution found, just needed to place the code in the right place. I don't know if this is the best way, but it seems to work as intended:
If Inputs(1).Value=3 Then
ListBox.CurSel = 0
sel = ListBox.CurSel
ListBox.CurSel = sel