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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top