|
-
Jan 9th, 2002, 08:45 AM
#1
Thread Starter
PowerPoster
classes
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!
-
Jan 9th, 2002, 09:31 AM
#2
Thread Starter
PowerPoster
anyone know how I can accomplish this using Property Procedures??
Thanks for any help
-
Jan 9th, 2002, 09:32 AM
#3
Hyperactive Member
Will it allow
Private MyVar() as double
?
-
Jan 9th, 2002, 09:36 AM
#4
Thread Starter
PowerPoster
yes, but .....
Originally posted by GlenW
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.
-
Jan 9th, 2002, 09:40 AM
#5
[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
-
Jan 9th, 2002, 09:40 AM
#6
Hyperactive Member
If you include Get and Let procedures within your class
they can allow access to the array.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|