Results 1 to 3 of 3

Thread: Error 374

  1. #1
    zemp
    Guest

    Error 374

    I have an app with two instances of the same VB user control. when the main form loads there is no problem. Th euser control works great. When I try to access the second form I get "run-time error 374: Failed to activate control 'VB.UserControl'...."

    Inside the VB IDE there is no problem. If I run the exe on my development machine there is no problem. BUT when the app is run on another machine I get the error. Both machines have the same OS setup (WIN2000).

    I have been unable to find any specific information on this error. Both in these forums and at the msdn site. Can anyone help.

  2. #2
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    Are you running the user control from an OCX file, or is it part of the project's source code? I've heard here that compiling to P-Code has cured a problem before, but I think it's slower to execute or something.

  3. #3
    New Member
    Join Date
    Feb 2008
    Posts
    1

    Re: Error 374

    I recently had a 374 error. I had modified an .OCX file in my application and as I had changed the arguments for a public function within the control, i had recompiled the application as well. All was working on my test system so the new files were distributed using an automatic update system as has always worked before. Most of the computers worked fine except for two.

    On these two computers, there was a copy of the outdated .OCX file in the windows directory. Windows was using this file instead of the updated versions which were contained within the application directory. Deleting the copies in the windows directories solved the problem.

    The problem only occurs if the old and new versions of the ocx have different APIs (e.g added or removed public subs or functions, modified arguements or return data types, etc.).

    I hope this information helps others.

Posting Permissions

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



Click Here to Expand Forum to Full Width