|
-
Jan 24th, 2000, 05:48 AM
#1
Thread Starter
Hyperactive Member
I have got a big problem now.
In declaration section I have:
Type Foto
Picture() As IPicutreDisp 'or something like that
Descrip() as String
End Type
Some rows of a sub are:
ReDim Foto.Picture(Val(read))
ReDim Foto.Descrip(Val(read))
where the first line (picture) cause a error 'Invalid ReDim'. Where is the error? I need to leave a picture stored in a dynamic array.
------------------
Thanks,
John, 14 years old
-
Jan 24th, 2000, 06:25 AM
#2
Lively Member
Hi John,
What is the value of read when you get this error?
If you want to keep the info. already stored in your array when you Redim it, you must use Redim Preserve rather than Redim alone.
All the best.
Chris
-
Jan 25th, 2000, 01:42 AM
#3
Thread Starter
Hyperactive Member
Thank you for your answer.
The value of read is usually 1 to 3 or 5, no big numbers.
Preserve keyword cause the same error.
What should I do now?
-
Jan 25th, 2000, 02:17 AM
#4
Lively Member
Hi John,
the problem seems to be the type! Try this:
Code:
Type Foto
Picture() As IPicutreDisp 'or something like that
Descrip() as String
End Type
sub test
dim testvar as Foto
ReDim testvar.Picture(Val(read))
ReDim testvar.Descrip(Val(read))
end sub
Roger
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
|