DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Question about RowNoStr in StatBlockCalc

Hi,
 
I'm trying to use StatBlockCalc in a VBS script.  I would like to calculate the average of the last few seconds (3 in the attached script below) of a data channel.  To do this, in my script I am determining what row numbers are the last 3 seconds of the channel.  Then, I am putting this into a "StatBlockCalc" command to calculate the average of these rows.  However, I retrieve the error, "The syntax for the line number is wrong." if I try to put a concatenated string for RowNoStr.  It works if I directly type it in (Row 19 in the script), but the concatenated version doesn't work (Row 21).  What am I doing wrong?  Please help!
 
Thank you!
Julia
 
0 Kudos
Message 1 of 3
(3,558 Views)
Hi Julia,

you only have to change the code for the concenated string. Because VBS can handle variants in most cases you can use this simple formula:

Call StatBlockCalc("Channel", AvgStartRow & "-" & AvgStopRow , MyChnName)

This will work, because VBS perfoms the conversion from numeric to string under the hood.

Stefan
0 Kudos
Message 2 of 3
(3,548 Views)
Thanks Stefan, I knew I was doing something silly.  I apprecitate the help!
 
Julia
0 Kudos
Message 3 of 3
(3,536 Views)