user control containedcontrols automation error


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: user control containedcontrols automation error

  1. #1
    Richard Guest

    user control containedcontrols automation error



    Hi, I am using the containedcontrols collection within a user control that
    has been setup as a container.

    Quite frequently, when referencing the containedcontrols collection at the
    start of a for each loop, I get this message:

    ---
    Run-time error '-2147417848 (80010108)':

    Automation error

    The object invoked has disconnected from its clients.
    ---

    Has anybody else come across this problem and, is there a fix for it?

    Regards and thanks,

    Richard

  2. #2
    Haymanth Guest

    Re: user control containedcontrols automation error


    Automation Error is not the actual error message. The error is probably coming
    from the contained control and isn't raised to the container control. You
    probably have to write an error trapping routine to raise the error, then
    you will get the true picture.


    the error trapping routine in the contained controls would look something
    like this:

    Sub_functionName()
    on error goto procErr:



    procExit:
    exit sub

    procErr:
    err.raise("fill in the required arguments here")
    goto procExit

    end sub

    "Richard" <rak@airnet.com.au> wrote:
    >
    >
    >Hi, I am using the containedcontrols collection within a user control that
    >has been setup as a container.
    >
    >Quite frequently, when referencing the containedcontrols collection at the
    >start of a for each loop, I get this message:
    >
    >---
    >Run-time error '-2147417848 (80010108)':
    >
    >Automation error
    >
    >The object invoked has disconnected from its clients.
    >---
    >
    >Has anybody else come across this problem and, is there a fix for it?
    >
    >Regards and thanks,
    >
    >Richard



  3. #3
    Richard Guest

    Re: user control containedcontrols automation error



    Thanks for the reply. I don't believe it is coming from the contained control,
    however, as if I do

    MsgBox UserControl.ContainedControls.Count

    VB shuts down with an application error.

    If I compile the program into an executable it works beautifully, it just
    doesn't appear to work properly in the development environment.

    I THINK I am using VB6 without any service packs, is there any way I can
    download a service pack for VB6 without having to download a Visual Studio
    6 service pack, which is enormous?

    Richard

    "Haymanth" <vb.@127.0.0.1> wrote:
    >
    >Automation Error is not the actual error message. The error is probably

    coming
    >from the contained control and isn't raised to the container control. You
    >probably have to write an error trapping routine to raise the error, then
    >you will get the true picture.
    >
    >
    >the error trapping routine in the contained controls would look something
    >like this:
    >
    >Sub_functionName()
    >on error goto procErr:
    >
    >
    >
    >procExit:
    >exit sub
    >
    >procErr:
    >err.raise("fill in the required arguments here")
    >goto procExit
    >
    >end sub
    >
    >"Richard" <rak@airnet.com.au> wrote:
    >>
    >>
    >>Hi, I am using the containedcontrols collection within a user control that
    >>has been setup as a container.
    >>
    >>Quite frequently, when referencing the containedcontrols collection at

    the
    >>start of a for each loop, I get this message:
    >>
    >>---
    >>Run-time error '-2147417848 (80010108)':
    >>
    >>Automation error
    >>
    >>The object invoked has disconnected from its clients.
    >>---
    >>
    >>Has anybody else come across this problem and, is there a fix for it?
    >>
    >>Regards and thanks,
    >>
    >>Richard

    >



  4. #4
    Phil Weber Guest

    Re: user control containedcontrols automation error

    > Is there any way I can download a service pack for VB6
    > without having to download a Visual Studio 6 service pack,
    > which is enormous?


    Richard:
    http://msdn.microsoft.com/vstudio/do.../dnldoverview.
    asp includes a link to download SP5 for just VB6 (58 MB). You may also order
    the Service Pack on CD here:
    http://msdn.microsoft.com/vstudio/do...5/ordering.asp
    --
    Phil Weber



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center