How To Fix Excel Automation Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About automation error in excel vba Us Learn more about Stack Overflow the company Business Learn more about hiring
Visual Basic Automation Error
developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the
Automation Error Vb6
Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Excel/VBA Automation Errors due to
Excel Automation Error Exception Occurred
Office Service Pack 3.0 caused by Forms up vote 6 down vote favorite 4 After installing all latest windows updates my Excel VBA code is showing an automation error at the very start of the first module. It contains some forms as well as numerous modules of VBA code. However, when removing the forms (and associated code) everything is fine. The same thing happened about a excel 2010 automation error on startup year ago after some other windows updates. Back then deleting the .exd files did the trick, but the current updates (including Service Pack 3) seem to be different. What is going on and how can I get the forms to work? All the code is unchanged and has survived all previous windows/office updates. Running Windows 7 (same happening on Vista machine) and Office 2007. windows excel vba ms-office windows-update share|improve this question asked Aug 15 '12 at 14:38 Rob 4343716 add a comment| 11 Answers 11 active oldest votes up vote 16 down vote accepted I used to see this a lot with Visual Basic and Crystal Reports; either due to a bad deployment or DLL Hell. So, my guess is that it's not the code but perhaps some 3rd party controls (OCXs, DLLs) you're using. Check your References (In VBA IDE, click Tools and References) and to see where each DLL is pointing. See if any of the dates on the libraries are different than a working machine and you may find the culprit. Edit The OP found the problem by following the steps above. The fix for this particular issue is to unregister mscomc
here for a quick overview of the site Help Center Detailed answers to any questions you might have excel automation error catastrophic failure Meta Discuss the workings and policies of this site About Us Learn vba automation error the object has disconnected from its client more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us runtime error 80131700 Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like http://stackoverflow.com/questions/11971358/excel-vba-automation-errors-due-to-office-service-pack-3-0-caused-by-forms you, helping each other. Join them; it only takes a minute: Sign up Excel VBA “Automation Error” due to Jan 2016 Office Update, probably caused by MSCOMCTL.OCX (Microsoft Windows Common Controls 6.o (Service Pack 6)) up vote 8 down vote favorite 2 EDITED ONCE SOLUTION WAS FOUND: I have added a Treeview Active X Control to http://stackoverflow.com/questions/34803843/excel-vba-automation-error-due-to-jan-2016-office-update-probably-caused-by-m one of our spreadsheet, using Microsoft Windows Common Controls 6.0 (Service Pack 6), i.e. MSCOMCTL.OCX which lives in c:\Windows\SysWOW64\ KB2881029 (Security Update for Microsoft Office 2010 32-Bit Edition) (MS16-004), pushed out from Microsoft on the 15/01/2016 (or thereabout), installs a new MSCOMCTL.OCX (version 6.1.98.46 which was "Created" 9/12/2015, but "Accessed" (i.e. installed on the computer) at the time of the update). This made the workbook "loose" reference to MSCOMCTL.OCX (quote marks on "loose", because the reference is still ticked but no longer works, the workbook doesn't compile because of "Compile error: Object library feature not supported" or "Automation error") It seems that the update modifies the registry key HKEY_CLASSES_ROOT\TypeLib{831FDD16-0C5C-11D2-A9FC-000F8754DA1}\ by adding a SubKey 2.0, but leaves it empty, and doesn't register the new MSCOMCTL.OCX. Fixing the problem requires 3 steps: 1) MSCOMCTL.OCX. needs to be un-registered and re-registered (Start button/search/command/right click command prompt/run as admistirator: c:\Windows\system32>Regsvr32 /u C:\Windows\SysWOW64\MSCOMCTL.OCX c:\Windows\system32>Regsvr32 C:\Windows\SysWOW64\MSCOMCTL.OCX When registering the new MSCOMCTL.OCX (Version 6.1.98.46) via REGSVR32, a new key is added in the Registry: HKEY_CLASSES_ROOT\TypeLib{831FDD16-0C5C-11D2-A9FC-000F8754
Forum Microsoft Office Application Help - Excel Help forum Excel Programming / VBA / Macros Automation Error in Excel VBA Macro To get replies by our experts at nominal charges, follow this link to buy points and http://www.excelforum.com/excel-programming-vba-macros/721238-automation-error-in-excel-vba-macro.html post your thread in our Commercial Services forum! Here is the FAQ for this forum. Closed Thread Results 1 to 13 of 13 Automation Error in Excel VBA Macro Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 03-10-2010,01:30 PM #1 davidwe View Profile View Forum Posts Registered User Join Date 03-10-2010 Location San Francisco MS-Off Ver Excel 2010 automation error Posts 4 Automation Error in Excel VBA Macro Thanks in advance for any guidance! I have a VBA macro in an Excel sheet that gives the following error when it loops after a few times, which has me stumped: Run-time error '-2147417848 (80010108)': Automation error. The object invoked has disconnected from its clients. The application flow works like this: - For next country in array -- Clear the spreadsheet -- Load excel automation error data from database into spreadsheet -- Do lots of processing on data -- Do a save as on this current file (to create country-specific versions) - Next This iterator works fine for every country in the loop individually, and even for 2 or 3 in a sequence. But invariably, it crashes with that error (after which I must force quit Excel to exit) after the 5th iteration. My internet research on the error has described problems caused by early binding when Excel is opened from a VB script calling it from outside, but since my entire codebase is contained within 4 modules in a single Excel workbook, that seems not to be relevant to my problem. I have verified that all the database connections are closed after I use the recordset, and there are no file objects referenced except the save as command, ActiveWorkbook.SaveAs filename:=fileRoot. And all the modules have Option Explicit at the top. Thank you! Register To Reply 03-10-2010,04:31 PM #2 JBeaucaire View Profile View Forum Posts Visit Homepage @dministrator Join Date 03-21-2004 Location Bakersfield, CA MS-Off Ver 2010 Posts 31,718 Re: Automation Error in Excel VBA Macro When you DEBUG at the point of the error, what line of code is highlighted? (that's a rhetorical Q).