Andy,

Welcome to KORG!

I'm not sure what Jens' original intent was, but the check for value "259" doesn't seem valid anymore. Try this updated version of the UDF:
 Code:
Function arrayenumgroup()
	Dim $retcode, $valuecounter, $currentvalue, $valuearray
		  
	$valuecounter = 0
	$currentvalue = EnumGroup($valuecounter)
        While Not @ERROR And $currentvalue
		ReDim preserve $valuearray[$valuecounter]
		$valuearray[$valuecounter] = $currentvalue
		$valuecounter = $valuecounter + 1
		$currentvalue = EnumGroup($valuecounter)
	Loop
		  
	$arrayenumgroup = $valuearray
EndFunction
Also, add "Break On" to the top of your script while testing, which will allow you to break the script processing without forcing a logoff. This is documented in the manual and FAQs.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D