Excel Visual Basic Automation Error On Startup
Contents |
be down. Please try the request again. Your cache administrator is webmaster. Generated Sat, 15 Oct 2016 10:50:04 GMT by s_wx1127 (squid/3.5.20)
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 Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting
Excel Vba Automation Error Exception Occurred
ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join excel vba automation error catastrophic failure the 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 excel vba automation error system call failed minute: Sign up Excel/VBA Automation Errors due to 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 http://answers.microsoft.com/en-us/msoffice/forum/msoffice_excel-mso_other/automation-errorunspecified-error/2c75ea54-981f-4634-ad25-f11647034000 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 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 http://stackoverflow.com/questions/11971358/excel-vba-automation-errors-due-to-office-service-pack-3-0-caused-by-forms 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 mscomctl.ocx: regsvr32 /u mscomctl.ocx Then register it: regsvr32 mscomctl.ocx share|improve this answer edited Aug 16 '12 at 9:57 answered Aug 15 '12 at 14:52 ray 4,72942849 Not straight forward to compare, but only key difference I found is "Microsoft Windows Common Controls 6.0 (SP6) MSCOMCTL.OCX which is dated 6/6/12 on the updated (and not working) machine and 4/11/11 on an "old" one. Not using any 3rd party controls and all worked fine until windows updates ran. –Rob Aug 15 '12 at 15:11 @Rob I would think comparing dates to files would be pretty straight forw
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 http://stackoverflow.com/questions/34803843/excel-vba-automation-error-due-to-jan-2016-office-update-probably-caused-by-m site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss https://www.experts-exchange.com/questions/28308782/Excel-crashes-when-running-Macro-with-Automation-Error.html Join the 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 automation error 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 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 excel vba automation 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-000F8754DA1}\2.2 If there was a SubKey named 2.1 already existing, it enters a reference that 2.2 is now the Key for use. But it doesn't do anything to the empty 2.0 SubKey ! If there is a 2.0 (or 2.1 for that matter) SubKey with nothing in it,
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > Excel crashes when running Macro with Automation Error Want to Advertise Here? Solved Excel crashes when running Macro with Automation Error Posted on 2013-12-03 MS Excel Visual Basic Classic 1 Verified Solution 31 Comments 2,186 Views Last Modified: 2013-12-06 Hi, Excel crashes when I press a button which runs a macro userform1.show OR when I use auto_open. If I go into the vba code and run it line by line, the program works fine. Once excel has crashed and windows recovers the file, I then get an "Automation Error" box pop up asking me to close the application. I am using Excel 2013 on one computer and Excel 2010 on another, the issue happens on both. Part of my code is pasted below - Please let me know if you need the full code to help identify the issue. Sub StartPro() Haulage.Show End Sub Select all Open in new window which calls Private Sub UserForm_Activate() Me.MultiPage2.Value = 0 End Sub Private Sub UserForm_Initialize() TextBox1.Value = Format(Date, "dd/mm/yyyy") Label4.Caption = Format(Sheets("PHCosts").Range("F2").Value, "Currency") Label5.Caption = Format(Sheets("PHCosts").Range("G2").Value, "Currency") Sheets("Haul").Select 'Registration comboboxes With Me.ComboBox1 .RowSourc