Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default Checking user defined types for Nothing

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Checking user defined types for Nothing

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

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

--
Regards,
Tom Ogilvy



"jayklmno" wrote:

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?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default Checking user defined types for Nothing

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?

"Tom Ogilvy" wrote:

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

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

--
Regards,
Tom Ogilvy



"jayklmno" wrote:

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?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Checking user defined types for Nothing

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


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


"jayklmno" wrote in message
...
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?

"Tom Ogilvy" wrote:

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

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

--
Regards,
Tom Ogilvy



"jayklmno" wrote:

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?



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default Checking user defined types for Nothing

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?

"Chip Pearson" wrote:

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


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


"jayklmno" wrote in message
...
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?

"Tom Ogilvy" wrote:

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

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

--
Regards,
Tom Ogilvy



"jayklmno" wrote:

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?






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Checking user defined types for Nothing

Post your code.


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


"jayklmno" wrote in message
...
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?

"Chip Pearson" wrote:

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


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


"jayklmno" wrote in
message
...
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?

"Tom Ogilvy" wrote:

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

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

--
Regards,
Tom Ogilvy



"jayklmno" wrote:

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?






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Standard chart types over-ridden by user-defined 'default' SWRDA man Charts and Charting in Excel 1 November 3rd 08 12:12 AM
subs or functions with user defined types Ray Pixley Excel Programming 2 February 27th 06 03:25 AM
User-defined data type; Error: Only User-defined types... tiger_PRM Excel Programming 1 July 18th 04 03:32 PM
Unable to add user-defined data types to a collection Adrian[_7_] Excel Programming 3 July 14th 04 08:01 PM


All times are GMT +1. The time now is 02:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"