Hello,
I'm going round in loops trying to get some code that used to work perfectly well in previous version of DIAdem but is now failing in 2019.
Originally, the code used a .vas file in which there were, amongst others, two variables as follows:
I'm afraid I can't find the reason for the $ sign. This is not used in the code as they are referenced using NoChan_ and ChanAct_(), respectively.
In trying to remove the use of vas files I first of all tried to use the Dim statement in my main script as follows:
This yields an error message from dialog editor (SUD), which says "Cannot link variables to the dialog box. You have specified the variables with the wrong type. This is the right type: Variant". This is weird for two reasons: firstly, you can't specify the type of variable in script and, secondly, they are variant by default.
I then checked my SUD file wherein I could see that the two variables were specified with types other than variant. I changed them to variant but to no avail.
I then wondered if the dialog box was not in the scope of the variables so I used the following at the head of my script:
I got the same error message, so the problem seems to be one of type rather than scope.
NoChan is simple the number of channels in the data file and is a number I want to pass the Dialog_EventInitialize code. ChanAct() is an array that is to receive the text string from a series of list boxes in the Dialog_EventTerminate code. ChanAct() is then used in my main script.
Grateful for any guidance.
Regards,
Simon.