|
-
Feb 16th, 2000, 03:16 AM
#1
Thread Starter
Junior Member
Please see the following code:
Type typTmp
vntFldAry as Variant
End Type
Function One()
Dim typTmpTmp As typTmp
Dim varAry()
Dim x
ReDim varAry(1)
varAry(0) = "Field0"
varAry(1) = "Field1"
typTmpTmp.vntFldAry = varAry
x = Two(typTmpTmp)
End Function
Function Two(varAry As Variant)
Debug.Print UBound(varAry.vntFldAry,1)
End Function
The problem is when the Ubound function executes it gives me the following error:
"Compile Error: Expected Variable".
I would like to be able to see the lower and upper bounds of the internal array to the type without having to pass the size with it.
Does any one have an idea of how to do this?
Thank you in advance for you help and continued support. 
------------------
David L. Baudais
Systems Analyst
-
Feb 16th, 2000, 05:53 AM
#2
New Member
The easiest way to fix this is to declare varAry as typTmp. You could also pass x = Two(typTmpTmp.vntFldAry) instead.
-
Feb 16th, 2000, 07:54 PM
#3
Thread Starter
Junior Member
Thank you for your kind reply unfortunately this would defeat the purpose of passing arrays to functions and then I would have to pass each element separtatly instead of the whole type.

------------------
David L. Baudais
Systems Analyst
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
|