Size of a user defined type with a byte array?

R

RichardF

How do I determine the actual in-memory size of a User
Defined type (UDT) with a variable size byte array? i.e. I
want to know the size the Type would take if written to a
disk file INCLUDING the size of things for which only a
pointer is stored.

e.g.

Type TestType
ByteArray() as Byte
End Type

Dim AVar as TestType

Redim AVar.ByteArray(0)
Debug.Print LenB(AVar) 'Shows 4

Redim AVar.ByteArray(1000)
Debug.Print LenB(AVar) 'Also Shows 4


Thanks

RichardF
 
Top