| Cl*** variables and default methods -
06-04-2007, 09:48 AM
Hi. I have created a cl*** called Collection2 that is a wrapper for the
Collection object. It has a function called Item (that can either set or get
the value of a certian key) that is the default method. If i use
private Options as Collection2
set Options=new Collection2
Options "somekey","somevalue"
i get a compile error 'procedure expected, not variable"
however if i do
dim Options as new Collection2
Options "somekey","somevalue"
it works fine. Also, if i use the first method but call the default function
as a function, such as in:
MsgBox Options("somekey")
then it works. Could someone maybe help me out on this? |