Hi Leiabcn,
The formula calculator doesn't know VBS, therefore it is not possible to use VBS variables defined by DIM. But you can use the auxiliary variables L1, L2, ... or R1, R2 ...
Than your script must be modified as follows:
for indexgroup=1 To GroupCount step 1
Call GroupDefaultSet(indexgroup)
L1 = cnoxget(indexgroup,2)
Call FormulaCalc ("Ch(L1):=Ch(L1)+(Ch(L1)<=0)*NoValue")
sChnNo= str(cnoxget(indexgroup,2))&"-"&str(cnoxget(indexgroup,GroupChnCount(indexgroup)))
Call ChnNovHandle (cnoxget(indexgroup,1),sChnNo,"Delete","xy",1)
next
By the way, cnoxget returns the channel number (this is not the channel index) and is from the type integer.
Greetings
Walter