Checking user defined types for Nothing

G

Guest

I have a user defined type that is not getting initialized under a certain
procedure and when it gets to a point, I need to check and see if it has been
initialized. I acnnot get any combination of Is Nothing, IsNull or anything
else I can think of to get it to discover if the UDT = Nothing.

Any suggestions?
 
G

Guest

You would have to check the individual elements I would think.

a UDT is not an object, so is nothing wouldn't work.
 
G

Guest

When I check an element, like ubound() I get a subscript error and it tells
me ubound(UDT) = nothing.

Is there a way to phrase the ubound statement that won't bomb out the code?
 
C

Chip Pearson

UBound is used only for arrays, not user defined types.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
G

Guest

This user defined type is an array. Ubound works normally on this if it is
intialized, but since it's not been intialized, how do I test that?
 

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