Excel Vba 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 excel vba automation error exception occurred and policies of this site About Us Learn more about Stack excel vba automation error catastrophic failure Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs excel vba automation error system call failed 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 you, helping each other. Join them; excel vba automation error unspecified error it only takes a minute: Sign up What is causing “Automation error Unspecified error” on Worksheet_Activate? up 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
Excel Vba Automation Error The Interface Is Unknown
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 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 Inter
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the
Excel Vba Automation Error Library Not Registered
workings and policies of this site About Us Learn more about Stack visual basic automation error Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs excel vba automation error 2147221080 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 you, helping each other. Join http://stackoverflow.com/questions/12270922/what-is-causing-automation-error-unspecified-error-on-worksheet-activate 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 one of our spreadsheet, using Microsoft Windows Common http://stackoverflow.com/questions/34803843/excel-vba-automation-error-due-to-jan-2016-office-update-probably-caused-by-m 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-000F8754DA1}\2.2 If there was a SubKey named 2.1 already existing, it enters a reference that 2.2 is
Forums Excel Questions Automation Error in VBA Page 1 of 3 123 Last Jump to page: Results 1 to 10 of 24 Automation Error in VBAThis is a discussion on Automation http://www.mrexcel.com/forum/excel-questions/649207-automation-error-visual-basic-applications.html Error in VBA within the Excel Questions forums, part of the Question Forums category; Hi. I have been attempting to perform a vlookup between 2 sheets and have just encountered the following error message: ... LinkBack LinkBack URL About LinkBacks Bookmark & Share Digg this Thread!Add Thread to del.icio.usBookmark in TechnoratiTweet this thread Thread Tools Show Printable Version Display Linear Mode Switch to Hybrid Mode Switch automation error to Threaded Mode Jul 25th, 2012,10:43 AM #1 Swoootie Board Regular Join Date Jun 2012 Posts 64 Automation Error in VBA Hi. I have been attempting to perform a vlookup between 2 sheets and have just encountered the following error message: Run-Time Error '-2147221080 (800401a8)': Automation Error What I am attempting to do is reference an eternal workbook where the information is trimmed and copied and pasted as excel vba automation values to match the destination cells and manually this works. When I try to hard code this using VBA, the error message pops up at the point at which the vlookup code is executed (so the trimming of the cells and copying across works fine). A cut version of my code is below: Option Explicit Sub PORTMON() Dim DT As Date 'INPUT BOX TAKES DATE FROM USER DT = Application.InputBox("Enter a Date as MMM YYYY") DT = Format(DT, "MMM YYYY") Dim PATH As String Dim WKBOOKATT2 As Workbook Dim FILENAME2 As String PATH = "C:\Checks\" FILENAME6 = "ACC_" & Left(Format(DT, "MMM YYYY"), 3) & "_" & Right(Format(DT, "MMM YYYY"), 4) Set WKBOOKATT2 = Workbooks.Open(PATH & "ACC_" & Left(Format(DT, "MMM YYYY"), 3) & "_" & Right(Format(DT, "MMM YYYY"), 4) & ".XLS") Dim APATT1 As Variant Workbooks.Open (SASPATH & "ACC_" & Left(Format(DT, "MMM YYYY"), 3) & "_" & Right(Format(DT, "MMM YYYY"), 4) & ".XLS") Range("F2").Select ActiveCell.FormulaR1C1 = "=TRIM(RC[-5])" Range("F2").Select Selection.AutoFill Destination:=Range("F2:F14") Range("F2:F14").Select Range("B2:B14").Select Selection.Copy Range("G2").Select ActiveSheet.Paste Range("F2:F14").Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Windows( _ "Acc Main.xls"). _ Activate Sheets("Stability").Select Range("D20").Select 'error occurs here APATT1 = Application.VLOOKUP(Range("A20").VALUE, WKBOOKATT2.Sheets(FILENAME2).Range("F2:G15"), 2, False) Range("D20").VALUE = APATT1 Has anyone come across anything like th