471,050 Members | 1,350 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,050 software developers and data experts.

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","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?
Jul 17 '05 #1
0 2380

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Neil Zanella | last post: by
5 posts views Thread by Diffident | last post: by
7 posts views Thread by Peter | last post: by
5 posts views Thread by Cyril Gupta | last post: by
15 posts views Thread by Manuel | last post: by
2 posts views Thread by timpera2501 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.