$varCount is just an iterator if that's what you're referring to when you say 'var'. I'm erring at the same place you are. I tried replacing '(', ')' with square brackets, but still no change. This works fine in VBS. I just can't nail the problem with the conversion...