PDA

Click to See Complete Forum and Search --> : passing arrays to user controls /class modules


fbokker
Apr 24th, 2001, 08:56 AM
Hi there!

I was just writing a user control, which does logarithmic plots. so i was trying to pass a dataarray to the control via

"property let Dataset(dataarray()as double)"

passing dataarrays within a module or form is no problem, sub's accept "sub blahblah (dataarray() as double)".
well, after some thinking it seems logical that this won't work that easy. (BUT, it does not make sense that Visual basic is crushing down without even saying goodbye, when you try it!)
so the question remains, how to do it? can anyone give me a hint? (my VB book doesn't tell)

vbfan928
Apr 24th, 2001, 04:55 PM
try use ByRef dataarray() as double

TO PASS ARRAY YOU HAVE TO USE ByRef

fbokker
Apr 25th, 2001, 01:51 AM
Ok! So I tried ByRef, but it does not make a difference, VB still crashes. And actually, it is not necessary to use ByRef usually, because it is the default for "property let" and all other sub's (if MSDN is right!).

?