Results 1 to 14 of 14

Thread: Error 429 - ActiveX component can't create object

  1. #1

    Thread Starter
    Frenzied Member aikidokid's Avatar
    Join Date
    Aug 2002
    Location
    Bristol, UK
    Posts
    1,968

    Error 429 - ActiveX component can't create object

    I don't have this problem on my machine, but when testing the installation on another machine (well Virtual PC) i get the error:

    Error 429 - ActiveX component can't create object

    I know what this error means, but I don't know why I am getting it.

    I have the following code in my MDIForm Load, which refers to a dll (vbsystraytools.dll) and after checking on Virtual PC, this dll is in the system32 folder and I assume it's registered (not quite sure how to check this).
    BTW: lngSysTray is a registry value for the option of minimising to the system tray
    Code:
    'Declarations
    Public WithEvents mobjSysTray As vbSysTrayTools.SysTray
    
    'Form_Load
    Set mobjSysTray = New vbSysTrayTools.SysTray
    Set mobjSysTray.ImageList = imgMO
    
    With mobjSysTray
        .Icon = 1
        .Menu.Add "Show", "SHOW"
        .Menu.Add "Hide", "HIDE"
        .EnableMenu = True
    End With
        
    If lngSysTray = 1 Then
        mobjSysTray.Visible = True
    Else
        mobjSysTray.Visible = False
    End If
    If somebody helps you, take time to RATE the post. I do.

    "FAILURE IS NOT AN OPTION. It comes bundled with the software."

    Below are some of the threads that have helped me along the way:

    CodeBank submission:
    Listview Backcolor (without subclassing)

    Loading Treeview Nodes From A Database, Creating Registry Keys, Count Number of Lines in TextBox , Excellent RichTextBox Tricks & Tips
    Ideas & Screen Shots For A Code Library App
    How to do Data validation in Excel, Conditional Formating in Excel

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Error 429 - ActiveX component can't create object

    It means it cant create either the mobjSysTray object or some other object that you may have coded. Can you step through the code and find the offending line?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Frenzied Member aikidokid's Avatar
    Join Date
    Aug 2002
    Location
    Bristol, UK
    Posts
    1,968

    Re: Error 429 - ActiveX component can't create object

    Not really because I don't get this error when running it in the IDE.

    Just a thought, but the dll file is located in a different place on my work PC, i.e. not in the system32 folder as it is on the virtul HD. Would this make any difference?
    I would guess not, but just in case
    If somebody helps you, take time to RATE the post. I do.

    "FAILURE IS NOT AN OPTION. It comes bundled with the software."

    Below are some of the threads that have helped me along the way:

    CodeBank submission:
    Listview Backcolor (without subclassing)

    Loading Treeview Nodes From A Database, Creating Registry Keys, Count Number of Lines in TextBox , Excellent RichTextBox Tricks & Tips
    Ideas & Screen Shots For A Code Library App
    How to do Data validation in Excel, Conditional Formating in Excel

  4. #4
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Error 429 - ActiveX component can't create object

    Quote Originally Posted by aikidokid
    I assume it's registered (not quite sure how to check this).
    Did you install it? or run RegSvr32 on it?

    If you didn't do either, it isn't installed - so run RegSvr32 (open a command prompt, then type RegSvr32 followed by the full path and filename).


    Note that it is safe to re-register something that is already registered (it just confirms the registry entries etc), so you can do it anyway.

  5. #5
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Error 429 - ActiveX component can't create object

    Just a note. On virtual pc, I will simply drop a dll or ocx I want to test in the same folder as the project. Register it as si_the_geek recommends, then unregister when done testing.

  6. #6

    Thread Starter
    Frenzied Member aikidokid's Avatar
    Join Date
    Aug 2002
    Location
    Bristol, UK
    Posts
    1,968

    Re: Error 429 - ActiveX component can't create object

    ok will give it a go, but shouldn't have the installation package have registered it?
    If somebody helps you, take time to RATE the post. I do.

    "FAILURE IS NOT AN OPTION. It comes bundled with the software."

    Below are some of the threads that have helped me along the way:

    CodeBank submission:
    Listview Backcolor (without subclassing)

    Loading Treeview Nodes From A Database, Creating Registry Keys, Count Number of Lines in TextBox , Excellent RichTextBox Tricks & Tips
    Ideas & Screen Shots For A Code Library App
    How to do Data validation in Excel, Conditional Formating in Excel

  7. #7
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Error 429 - ActiveX component can't create object

    If it was part of an installation package you ran, it should have been registered - unless you somehow added it as "do not register".


    Do you have error handlers in your program? If so, simply add a call to the Erl function in your message (eg: MsgBox "Error " & err.number & " on line " & Erl ": " & err.description ), and number your lines - which you can do with a single click with MZTools (link in my signature).

    You should then be able to tell exactly where the error is, and thus hopefully be able to tell exactly what is causing the problem.

  8. #8
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Error 429 - ActiveX component can't create object

    Post the line where you include this file in your installation script.

  9. #9

    Thread Starter
    Frenzied Member aikidokid's Avatar
    Join Date
    Aug 2002
    Location
    Bristol, UK
    Posts
    1,968

    Re: Error 429 - ActiveX component can't create object

    Quote Originally Posted by randem
    Post the line where you include this file in your installation script.
    Code:
    Source: C:\Documents and Settings\Andrew\My Documents\VB6\MO\Inno\Copy dll files\vbsystraytools.dll; DestDir: {sys}; Flags:  regserver restartreplace sharedfile;
    Quote Originally Posted by si_the_geek
    MZTools (link in my signature).
    Aready got it thanks
    Quote Originally Posted by si_the_geek
    You should then be able to tell exactly where the error is, and thus hopefully be able to tell exactly what is causing the problem.
    OK, added lines, recompiled and run the setup on Virtual PC.
    The error is on this line
    Code:
    Set mobjSysTray = New vbSysTrayTools.SysTray
    which refers to the vbSysTrayTools.dll.
    The dll file is registered and resides in the system32 folder.

    I do have the original project that was compiled into this dll file. Would it be better to just compile the project in with my project?
    If somebody helps you, take time to RATE the post. I do.

    "FAILURE IS NOT AN OPTION. It comes bundled with the software."

    Below are some of the threads that have helped me along the way:

    CodeBank submission:
    Listview Backcolor (without subclassing)

    Loading Treeview Nodes From A Database, Creating Registry Keys, Count Number of Lines in TextBox , Excellent RichTextBox Tricks & Tips
    Ideas & Screen Shots For A Code Library App
    How to do Data validation in Excel, Conditional Formating in Excel

  10. #10
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Error 429 - ActiveX component can't create object

    That line from your script looks fine to me - hopefully someone who uses Inno Setup will be able to confirm.


    I'm not sure what the problem is, and it may actually be within the DLL itself. To find the actual cause, I'd recommend adding similar error handling to the DLL, and seeing if that is the case (even if it isn't, the error handling could well be useful later).

    Adding the project within yours may not help, but then again it might - so it would be a valid way to go.

  11. #11

    Thread Starter
    Frenzied Member aikidokid's Avatar
    Join Date
    Aug 2002
    Location
    Bristol, UK
    Posts
    1,968

    Re: Error 429 - ActiveX component can't create object

    Quote Originally Posted by si_the_geek
    That line from your script looks fine to me - hopefully someone who uses Inno Setup will be able to confirm.
    It installs the dll file in the System32 folder and it is registered.

    Quote Originally Posted by si_the_geek
    I'm not sure what the problem is, and it may actually be within the DLL itself. To find the actual cause, I'd recommend adding similar error handling to the DLL, and seeing if that is the case (even if it isn't, the error handling could well be useful later).
    I have run the dll code in the vbSysTrayTools.vbp and added my exe and it works just fine.
    I have registered the dll on my PC and the dll works as expected when using VB6 and running my project.
    How do you mean adding error handling to the dll. It has 4 classes and 2 modules. Where would I begin


    Quote Originally Posted by si_the_geek
    Adding the project within yours may not help, but then again it might - so it would be a valid way to go.
    I have tried this but got stuck at the first hurdle
    See my question here. Post #11
    If somebody helps you, take time to RATE the post. I do.

    "FAILURE IS NOT AN OPTION. It comes bundled with the software."

    Below are some of the threads that have helped me along the way:

    CodeBank submission:
    Listview Backcolor (without subclassing)

    Loading Treeview Nodes From A Database, Creating Registry Keys, Count Number of Lines in TextBox , Excellent RichTextBox Tricks & Tips
    Ideas & Screen Shots For A Code Library App
    How to do Data validation in Excel, Conditional Formating in Excel

  12. #12
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Error 429 - ActiveX component can't create object

    Quote Originally Posted by aikidokid
    How do you mean adding error handling to the dll. It has 4 classes and 2 modules. Where would I begin
    Like for any error handling - simply add an error handler to each sub/function. As you have MZTools, it'll just be one click per routine.

    I have tried this but got stuck at the first hurdle
    See my question here. Post #11
    It will probably work if you simply remove the DLL (AKA project) name, and just use the Class name, eg: ".. As SysTray"

  13. #13

    Thread Starter
    Frenzied Member aikidokid's Avatar
    Join Date
    Aug 2002
    Location
    Bristol, UK
    Posts
    1,968

    Re: Error 429 - ActiveX component can't create object

    Thanks once again si

    By removing the DLL name it has solved the problem when I install on Virtual PC, so I am hoping this is it.
    It doesn't answer why it wouldn't work with the actual dll file though!

    I will add the error handling to the included project, just in case.

    I have always written out all of my error handling. I really should look into the help that is available to me. I have had MZTools for years

    Edit: can't rate you again yet!
    Last edited by aikidokid; Dec 1st, 2007 at 12:46 PM.
    If somebody helps you, take time to RATE the post. I do.

    "FAILURE IS NOT AN OPTION. It comes bundled with the software."

    Below are some of the threads that have helped me along the way:

    CodeBank submission:
    Listview Backcolor (without subclassing)

    Loading Treeview Nodes From A Database, Creating Registry Keys, Count Number of Lines in TextBox , Excellent RichTextBox Tricks & Tips
    Ideas & Screen Shots For A Code Library App
    How to do Data validation in Excel, Conditional Formating in Excel

  14. #14
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Error 429 - ActiveX component can't create object

    There's no need to write it out! Just go into MZTools options, select the "Error Handler" tab and enter a template like this (but altered to suit your own method/style!):
    Code:
      On Error GoTo ErrorHandler:
    
    	{PROCEDURE_BODY}
    
    
    ErrorHandler:                       '** Error handler **
      If Err.Number <> 0 Then
        Call MyErrorHandlingSub("{PROCEDURE_NAME}")
      End If
                                      'tidy up:
      '(tidy-up code for the routine here [close files, etc])
    (the bits inside {} are things MZTools will fill-in for you, there's a list above the edit area)

    Once you have the template, it is just one click to add it (including the bits filled in as apt) around the code of whatever routine you are in. Nice!

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