-
Split() not working
Hello,
I'm using VBScript to read an entry from Access using the following code:
dim ProdColor(100) As Variant
dim holdcolor
RS.MoveFirst
holdcolor = RS("Color")
ProdColor() = Split(holdcolor)
it returns:
Microsoft VBScript compilation error '800a0401'
Expected end of statement
detail.asp, line 47
dim ProdColor(100) As Variant
-------------------^
I've browsed this forum, it appears I'm coding properly.
Any help?
thanks
AGB
-
2 amiss here:
dim ProdColor(100) As Variant <-- don't 'size' the array and don't declare 'As Variant'
This will do nicely!
dim ProdColor()
-
One more...
ProdColor() = Split(holdcolor)
should be
ProdColor = Split(holdcolor)
-
Up & running
I'm up & running, thank you all.
AGB