12-11-2008 04:52 AM
This is a very simple one... but it is slowly driving me mad.
I have some data, i want to know the maximum, but i want to go through several channels so i'm using a variable for my channel number....
Option Explicit 'Forces the explicit declaration of all the variables in a script.
dim data
dim maxval
dim minval
data = "ch(" " [1]/[2] " " ) "
maxval=CMax("&data& " )
minval=CMin(ch("&data& " )
I get an error of " An invalid text operand is used within the index operation of the formula CHNMAXVAL(0) : "
I've tried various syntaxes and it still won't work...
(i added in some spaces on this post to stop the code being full of smiley faces)
cheers.
12-12-2008 01:12 AM
Hello Tom!
Keep it simple and try this:
Option Explicit dim data dim maxval dim minval data = "[1]/[2]" maxval=CMax(data) minval=CMin(data)
Matthias
Matthias Alleweldt Project Engineer / Projektingenieur | Twigeater? |