• Welcome to Valhalla Legends Archive.
 

ParramArray as Variant

Started by CrAz3D, June 21, 2004, 03:19 PM

Previous topic - Next topic

CrAz3D


Public Sub LoadObjects(ParamArray Obj() As Variant)
ReDim PlugY(0)
ReDim PlugL(0)

On Error GoTo LoadER
   For i = LBound(Obj) To UBound(Obj) Step 2
       MsgBox Obj(i + 1)
       PlugY(UBound(PlugY)) = Obj(i)

       PlugL(UBound(PlugL)) = Obj(i + 1)
       ReDim Preserve PlugY(UBound(PlugY) + 1)
   Next i
Exit Sub
LoadER: MsgBox "Load OBs" & Err.Description
End Function

Error I recieve is that the object variable or with variable is not set, it highlights:
PlugY(UBound(PlugY)) = Obj(i)

I am accessing this sub by:


ClassName.LoadObjects Queue, "Queue", Funcs, "Functions"


Queue & Funcs are both classes

Any ideas?


*Sorry about the code tags, for some reason I can't get them to work, I change it & then they go back to how they were before
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

CrAz3D

Set PlugY(UBound(PlugY)) = Obj(i)
Forgot one little word, set
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...