Ms Excel Compile Error Automation Error
Contents |
be down. Please try the request again. Your cache administrator is webmaster. Generated Thu, 20 Oct 2016 21:44:04 GMT by s_wx1157 (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 excel vba automation error catastrophic failure more about Stack Overflow the company Business Learn more about hiring developers or posting vba automation error unspecified error internet explorer ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community
Automation Error Exception Occurred
Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up What is causing “Automation error Unspecified error” on Worksheet_Activate? up http://answers.microsoft.com/en-us/msoffice/forum/msoffice_excel-msoffice_custom/excel-2007-compile-error-automation-error-on/c4e0edaf-9a51-4fd6-8aa1-2bce1dd2b1da vote 2 down vote favorite 2 I have a worksheet named "Dates" (object name is A_Dates) that needs to be calculated when it is activated (It may be worth noting that this is in my Personal macro workbook). I regularly have workbooks open that have too many calculations in the for me to have auto-calculation on. So I have auto-calc set to manual, and the following code in the http://stackoverflow.com/questions/12270922/what-is-causing-automation-error-unspecified-error-on-worksheet-activate worksheet: Private Sub Worksheet_Activate() A_Dates.Calculate End Sub This has worked fine for the last 3 months, day-in and day-out. Yesterday, it stopped working. It now throws this error on the declaration line: Microsoft Visual Basic Automation error Unspecified error [OK] [Help] I have tried changing how I reference the sheet, using: Sheets("Dates").Calculate and ActiveSheet.Calculate to no avail. I've also included error handling: On Error Resume Next which doesn't prevent it. I've even gone so far as: Private Sub Worksheet_Activate() On Error GoTo headache Sheets("Dates").Calculate Exit Sub headache: Exit Sub End Sub and it still shows up. I am totally at a loss. Help? Additional Information I have the following references, and use all of them in various macros in this workbook: Visual Basic for Applications Microsoft Excel 12.0 Object Library OLE Automation Microsoft Office 12.0 Object Library Microsoft Scripting Runtime Microsoft Forms 2.0 Object Runtime Microsoft HTML Object Library Microsoft Internet Controls Microsoft ActiveX Data Objects 2.8 Library Microsoft ActiveX Data Objects Recordset 2.8 Library vba error-handling excel-2007 share|improve this question edited Sep 4 '12 at 21:43 asked Sep 4 '12 at 20:30 Farfromunique 1311112 If you comment that line out and manually force a Recalc (using [F9]) do you receiv
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies http://stackoverflow.com/questions/11971358/excel-vba-automation-errors-due-to-office-service-pack-3-0-caused-by-forms of this 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 http://www.tek-tips.com/viewthread.cfm?qid=1681635 Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: automation error 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 of the first module. It contains some forms as well as numerous modules of VBA code. However, when removing the forms (and associated vba automation error 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 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 culpri
FORUMSFOR COMPUTER PROFESSIONALS Log In Come Join Us! Are you aComputer / IT professional?Join Tek-Tips Forums! Talk With Other Members Be Notified Of ResponsesTo Your Posts Keyword Search One-Click Access To YourFavorite Forums Automated SignaturesOn Your Posts Best Of All, It's Free! Join Us! *Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting Guidelines Promoting, selling, recruiting, coursework and thesis posting is forbidden.Tek-Tips Posting Policies Jobs Jobs from Indeed What: Where: jobs by Link To This Forum! Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.Just copy and paste the BBCode HTML Markdown MediaWiki reStructuredText code below into your site. VBA Visual Basic for Applications (Microsoft) Forum at Tek-Tips HomeForumsProgrammersLanguagesVBA Visual Basic for Applications (Microsoft) Forum Excel VBA -- Compile Error: Automation Error thread707-1681635 Forum Search FAQs Links MVPs Excel VBA -- Compile Error: Automation Error Excel VBA -- Compile Error: Automation Error cebalaw (Programmer) (OP) 26 Apr 12 11:34 I wrote an Excel VBA program for my company that has been utilized for about a year with over 350 users, all running Windows XP and Office 2007. A handful of users who receive a new laptop (same as mine), have experienced a "Compile Error: Automation Error" when they attempt to run the program. There are no error codes, and the compile error points to a procedure declaration that compiles fine on other PCs: "Public Function KeyFound(strKey As String, SourceCollection As Collection) As Boolean". I have commented out the procedure only to get another compile error at a different procedure. I checked for missing references and found none; I have disabled any Add-Ins; I tried to delete all .EXD files; nothing works. One user reinstalled Office and got the program to run, another, needed to have IT rebuild his laptop and got it to work. I need to find the problem so I don't have to keep having users rebuild their laptops. Any help would be greatly appreciated. RE: Excel VBA -- Compile Error: Automation Error SkipVought (Programmer) 26 Apr 12 11:43 hi,It happens, from time to time, when I get my laptop refreshed (replaced), that some dll or a driver or something has been missed.Your colleague, "reinstalled Office and got the program to run" and other had to "have IT rebuild his laptop."Sad, but true.IT sometimes drops the ball in such instances. So here's the