Class variables and default methods

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mark

    Class variables and default methods

    Hi. I have created a class 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","some value"

    i get a compile error 'procedure expected, not variable"
    however if i do

    dim Options as new Collection2
    Options "somekey","some value"

    it works fine. Also, if i use the first method but call the default function
    as a function, such as in:

    MsgBox Options("someke y")

    then it works. Could someone maybe help me out on this?


Working...