VB won't let me do this in a class module:
Public MyVar() as double
Error message says that an array is not allowed here
I need to be able to have a class of the form:
MyClass.MyVar(x)
Is there anyway to do this?
Thanks for any help!
Printable View
VB won't let me do this in a class module:
Public MyVar() as double
Error message says that an array is not allowed here
I need to be able to have a class of the form:
MyClass.MyVar(x)
Is there anyway to do this?
Thanks for any help!
anyone know how I can accomplish this using Property Procedures??
Thanks for any help
Will it allow
Private MyVar() as double
?
Thanks for the response. It will allow Private, but I need access to the array outside the class module, so this won't help in my case.Quote:
Originally posted by GlenW
Will it allow
Private MyVar() as double
?
[VBVCODE]
Private MyVar() as double
public property get Value(byval Index as long) as double
Value= MyVar(Index)
End property
[/Highlight]
That should do it
If you include Get and Let procedures within your class
they can allow access to the array.