+ Reply to Thread
Results 1 to 6 of 6

Checking user defined types for Nothing

  1. #1
    jayklmno
    Guest

    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. #2
    Tom Ogilvy
    Guest

    RE: 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. #3
    jayklmno
    Guest

    RE: 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. #4
    Chip Pearson
    Guest

    Re: 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" <jayklmno@discussions.microsoft.com> wrote in message
    news:C0F90D03-3AF0-4BA0-97EA-DA23860969CB@microsoft.com...
    > 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. #5
    jayklmno
    Guest

    Re: 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" <jayklmno@discussions.microsoft.com> wrote in message
    > news:C0F90D03-3AF0-4BA0-97EA-DA23860969CB@microsoft.com...
    > > 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. #6
    Chip Pearson
    Guest

    Re: Checking user defined types for Nothing

    Post your code.


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


    "jayklmno" <jayklmno@discussions.microsoft.com> wrote in message
    news:92B1AFE5-0D22-4878-AC34-9BEAAD84ABCB@microsoft.com...
    > 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" <jayklmno@discussions.microsoft.com> wrote in
    >> message
    >> news:C0F90D03-3AF0-4BA0-97EA-DA23860969CB@microsoft.com...
    >> > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1