Excel 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 excel vba microsoft forms exception occurred or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x
Automation Error Exception Occurred Project 2010
Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it
Excel 2010 Automation Error Exception Occurred
only takes 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
Automation Error Vba
an excel tool 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 53761625 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 differe
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 http://stackoverflow.com/questions/23526974/sporadic-automation-error-exception-occurred-possibly-reference-based to Threaded 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 http://www.vbforums.com/showthread.php?647755-RESOLVED-Excel-2010-Automation-Error-when-creating-SaveAs-file-dialog the Visual Basic 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
Forums Excel Questions Problems running macro VBA Results 1 to 8 of 8 Problems running macro VBAThis is a discussion on Problems running macro VBA within the Excel Questions forums, part of the http://www.mrexcel.com/forum/excel-questions/288260-problems-running-macro-visual-basic-applications.html Question Forums category; I have the following problem: I received an Excel file with VBA macro. It runs when pressing the macro button. ... 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 to Threaded Mode Nov 6th, 2007,11:10 AM #1 guido124 New Member Join Date automation error Jul 2005 Posts 36 Problems running macro VBA I have the following problem: I received an Excel file with VBA macro. It runs when pressing the macro button. When I save the file, close it and re-open, it crashes when pressing the macro button. If I then close, re-open and now first save (before running the macro), I can run the macro successfully. The colleague who wrote the macro, automation error exception can run it under all circumstances. With other colleagues, for some it works, for others it doesn't. Does anybody know what could cause this? Share Share this post on Digg Del.icio.us Technorati Twitter Reply With Quote Nov 6th, 2007,11:17 AM #2 Jonmo1 MrExcel MVP Join Date Oct 2006 Location Bryan, TX Posts 41,941 1. We'll probably need to see the code to help. 2. Describe "Crashes". What exactly happens? Does it give an error? What error? Do you have a Debug Option when it errors? What line is highlighted... 3. Without knowing the above information, Best guess is a Difference in Excel Versions between you and your coleague(s). Share Share this post on Digg Del.icio.us Technorati Twitter Add-in for posting ranges as copyable tables (bottom of the page) -Win & Mac The more we learn, and the better we get at our trade, the easier it becomes to overlook the obvious. Life moves pretty fast. If you don't stop and look around once in a while, you could miss it. Ferris Bueller A.K.A. John Hughes, 1986 Reply With Quote Nov 6th, 2007,11:18 AM #3 brian.wethington Board Regular Join Date Jul 2006 Location Irving TX Posts 1,723 Without having seen any code, the line the cod