+ Reply to Thread
Results 1 to 9 of 9

Automation Error 440 when Opening Userform

  1. #1
    Forum Contributor
    Join Date
    03-26-2015
    Location
    Cookeville, TN
    MS-Off Ver
    Excel 365
    Posts
    221

    Automation Error 440 when Opening Userform

    One of my clients reports that a project tracking file I created for them (years ago) is now giving a runtime error 440 (Automation error) when they try to add a new project.

    The file has two userforms: NewProjectForm (for adding a new project) and EditProjectForm (for editing an existing project).
    The runtime error occurs when executing the NewProjectForm.Show command. That userform has a UserForm_Initialize routine that initializes several comboboxes, checkboxes, and textboxes. The userform is never displayed; the error occurs before the form is displayed.
    They have tried the file on at least two different PCs in their office - same result on each.

    I am puzzled by two things:
    -- The file works perfectly fine (no errors) on my PC, and has worked fine for them for years (until about a week ago, apparently).
    -- The EditProjectForm ALSO has a UserForm_Initialize routine that initializes several comboboxes, checkboxes, and textboxes, but THAT userform works fine for them (no errors).

    Can anyone suggest how to troubleshoot this? What could have changed in their system to cause this Automation error? Why would one userform crash, but the other one works OK?

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,971

    Re: Automation Error 440 when Opening Userform

    Get them to change their Error Trapping options in the VB Editor (Tools - Options - General tab) to 'Break in class module' then run the code again. It should then stop on the actual problem line in the Initialize event.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Forum Contributor
    Join Date
    03-26-2015
    Location
    Cookeville, TN
    MS-Off Ver
    Excel 365
    Posts
    221

    Re: Automation Error 440 when Opening Userform

    Quote Originally Posted by rorya View Post
    Get them to change their Error Trapping options in the VB Editor (Tools - Options - General tab) to 'Break in class module' then run the code again. It should then stop on the actual problem line in the Initialize event.
    Nope, it still stops at the NewProjectForm.Show command. Same as before.

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,971

    Re: Automation Error 440 when Opening Userform

    When it stops there, if they press f8 what happens?

  5. #5
    Forum Contributor
    Join Date
    03-26-2015
    Location
    Cookeville, TN
    MS-Off Ver
    Excel 365
    Posts
    221

    Re: Automation Error 440 when Opening Userform

    Quote Originally Posted by rorya View Post
    When it stops there, if they press f8 what happens?
    Same message: Error 440, Automation error

  6. #6
    Registered User
    Join Date
    07-03-2023
    Location
    Turkey
    MS-Off Ver
    2016
    Posts
    4

    Re: Automation Error 440 when Opening Userform

    Has the name of the hyperlinking page been changed in the code section?

    Have there been any changes to the Office version?

    Is there any chance we can see the file?

  7. #7
    Forum Contributor
    Join Date
    03-26-2015
    Location
    Cookeville, TN
    MS-Off Ver
    Excel 365
    Posts
    221

    Re: Automation Error 440 when Opening Userform

    Quote Originally Posted by ibutun09 View Post
    Has the name of the hyperlinking page been changed in the code section?

    Have there been any changes to the Office version?

    Is there any chance we can see the file?
    There is no "hyperlinking page". Macro is triggered by a SelectionChange event on one of the worksheets, which (if they click on a certain cell) calls another macro (which is in a module). That macro consists of one line of code (NewProjectForm.Show), which is what triggers the error.

    I suspect they may have gotten some kind of Office update, but I'm not sure.

    Also, another interesting note: I sent them a copy of the original file that I created (2 years ago), and THAT file works OK for them, despite the userform and macro code being identical.

    Sorry, I cannot share the actual file.

  8. #8
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,971

    Re: Automation Error 440 when Opening Userform

    If the original file works for them, it would suggest that they have changed something fundamental in their copy of the file, such as adding activex controls (which become part of the project).

  9. #9
    Forum Contributor
    Join Date
    03-26-2015
    Location
    Cookeville, TN
    MS-Off Ver
    Excel 365
    Posts
    221

    Re: Automation Error 440 when Opening Userform

    Quote Originally Posted by rorya View Post
    If the original file works for them, it would suggest that they have changed something fundamental in their copy of the file, such as adding activex controls (which become part of the project).
    If they changed anything significant, it was unintentional.
    Looks like we'll be copying all their current data and pasting into the original file, to see if that fixes the issue.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Runtime 440 error when opening a UserForm
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 12-13-2022, 02:52 AM
  2. Compile Error: Automation Error when opening in Mac, but not in Windows
    By kopite2002 in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 0
    Last Post: 11-19-2019, 12:34 PM
  3. Automation Error... maybe cause by Textbox in Userform
    By Fahmieyz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-03-2015, 12:30 AM
  4. Overflow error when opening the Userform
    By intex in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-16-2014, 03:10 PM
  5. Automation error when opening Access database
    By GWB in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-26-2010, 05:04 PM
  6. Out of Subscript error while opening a Userform
    By shivboy in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-22-2006, 07:07 AM
  7. [SOLVED] Error opening Excel app via automation
    By VanS in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-22-2005, 01:05 PM

Tags for this Thread

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