Go Back   Forum Care Forums > Development Reference Area > Visual Basic

Reply
 
LinkBack Thread Tools Display Modes
Cl*** variables and default methods
Old
  (#1)
Mark
Guest
 
Posts: n/a
Default 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?


   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Contact Us - Forum Care Forums - Archive - Top