Automation Error Exception Occurred
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 Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting automation error exception occurred project 2010 ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join excel 2010 automation error exception occurred 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
Excel Vba Automation Error Exception Occurred
a minute: Sign up Sporadic Automation Error: Exception Occurred, Possibly Reference Based up vote 0 down vote favorite 1 My team has had this strange error bugging us during development. From time to time when running VBA on an excel tool
Excel Vba Microsoft Forms Exception Occurred
that my team is building, Excel will crash and the "Microsoft has stopped working" pop-up will appear and when the user selects the 'close the program' option another pop-up stating "Automation Error Exception Occurred" appears. Now here is where it gets weird: It only happens on the machines running 2007, 2010 and 2013 machines never have this issue. Only happens every couple weeks (every 3-5 versions of the tool). These same machines have been running and testing the tool all day every day up until the point it occurs. There is no noticeable difference between the versions that work and those that don't from a code perspective. The have been several instances where a machine will run the VBA code fine and suddenly the error will start occurring. Once, a 2007 machine encounters the error, that file will never work on that machine or any other 2007 machine again. BUT, if given a fresh copy of the same exact file, sometimes the problem will disappear. after some online review, I have tracked the error down to three references being used: OLE Automation, Microsoft Office 12.0 Object Library, Microsoft CDO for Windows 200 Library. If any of these three are disabled in any combination the VBA will start running bug-free. My questions are: What could cause an error that would allow a tool to work a dozen times on a machine (with or without changes being saved) and suddenly stop running and never run again until replaced with a fresh copy? What possible interactions between the three above references could be related to this? vba excel-vba excel-2007 share|improve this question edited May 24 '14 at 3:22 Jamal 56361625 asked May 7 '14 at 19:46 BenW301 70112 1 Are you using any ActiveX controls not provided as standard by the VBA editor toolbox (i.e. Treeview, Listview, etc)? I had a similar problem, which was caused by ever-so-slightly different versions of this control. In the end, b
when creating SaveAs file dialog If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 5 of 5 Thread: [RESOLVED] [Excel 2010] Automation Error when creating SaveAs file dialog Tweet Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded http://stackoverflow.com/questions/23526974/sporadic-automation-error-exception-occurred-possibly-reference-based Mode Apr 20th, 2011,01:18 PM #1 UberChemist View Profile View Forum Posts Thread Starter New Member Join Date Apr 2011 Posts 8 [RESOLVED] [Excel 2010] Automation Error when creating SaveAs file dialog I have many macros in my personal workbook (PERSONAL.XLSB), and so when I close all open workbooks the Excel application window stays open and I can still use the Visual Basic http://www.vbforums.com/showthread.php?647755-RESOLVED-Excel-2010-Automation-Error-when-creating-SaveAs-file-dialog editor to edit these macros. I have narrowed my problem down to this: Code: Sub Tester() Dim MyDialog As FileDialog Set MyDialog = Application.FileDialog(msoFileDialogSaveAs) End Sub When I execute this code with a workbook open (like the default Book1), this works fine. If I close all workbooks and execute this code, then I get the following error: Automation error Exception occurred. Then the windows error reporting system chimes in with "Microsoft Excel has encountered a problem and needs to close." and the application closes. I can post the details of the error report if it would help, but otherwise I'll spare you. The error does not occur with the other three types of file dialog (FilePicker, FolderPicker, Open). I want to use this as part of a larger macro that will create a new workbook with certain parameters that I specify, and I need the SaveAs dialog to be able to create a new file. I'd like it to run regardless of whether other workbooks are open. Any ideas? Reply With Quote Apr 20th, 2011,02:41 PM #2 nO_OnE View Profile View Forum Posts Hyperactive Member Join Dat
Forums Excel Questions automation error exception occurred Results 1 to 2 of 2 automation error exception occurredThis is a discussion on automation error exception occurred within http://www.mrexcel.com/forum/excel-questions/693084-automation-error-exception-occurred.html the Excel Questions forums, part of the Question Forums category; I am running into an issue with several macros that export tabs into a separate workbook, breaks links, copy/paste values, ... 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 exception occurred Switch to Threaded Mode Mar 22nd, 2013,05:36 PM #1 kyddrivers New Member Join Date Mar 2013 Posts 22 automation error exception occurred I am running into an issue with several macros that export tabs into a separate workbook, breaks links, copy/paste values, save as the workbook and then closes. Code: Sheets("Site").Select Sheets("Site").Copy ActiveWorkbook.BreakLink Name:= _ "\\path\file.xlsm", Type:= _ xlExcelLinks Cells.Select Range("C1").Activate Selection.Copy automation error exception Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _ xlNone, SkipBlanks:=False, Transpose:=False Range("C1").Select Sheets("Site").Select ActiveWorkbook.SaveAs Filename:= _ "\\path\Site.xlsx" _ , FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False Application.CutCopyMode = False ActiveWorkbook.Close The error forces excel to close completely and seems to happen about the time I am doing the save as. Any words of wisdom to correct this issue is greatly appreciated Share Share this post on Digg Del.icio.us Technorati Twitter Reply With Quote Mar 22nd, 2013,06:44 PM #2 sergioMabres Board Regular Join Date Feb 2013 Location Córdoba, Argentina Posts 706 Re: automation error exception occurred Try doing chkdsk /f to check for disk errors Share Share this post on Digg Del.icio.us Technorati Twitter Reply With Quote « Previous Thread | Next Thread » Like this thread? Share it with others Like this thread? Share it with others Twitter Linked In Google Reddit StumbleUpon Posting Permissions You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On [VIDEO] code is Off HTML code is On Trackbacks are On Pingbacks are On