5981 Application-defined Or Object-defined Error
Contents |
report you receive the following error: 5981:Application-defined
Application Defined Or Object Defined Error In Macro
or object-defined error Cause MSWord File Block Settings are preventing the report template from opening, or causing it to open
Application Defined Or Object Defined Error In Vba
in Protected Mode The template for the selected report Style is corrupt or missing There is a problem with the Guard1 Plus installation Resolution Refer to Resolution section of 5834:Item with specified name does not exist. Copyright © 2013 TimeKeeping Systems, Inc. Open topic with navigation
soon) Ruby (coming soon) Getting Started Code Samples Resources Patterns and Practices App Registration Tool Events Podcasts Training API Sandbox Videos Documentation Office Add-ins Office application defined or object defined error vba 1004 Add-in Availability Office Add-ins Changelog Microsoft Graph API Office 365 Connectors Office
Application Defined Or Object Defined Error Vba Formula
365 REST APIs SharePoint Add-ins Office UI Fabric Submit to the Office Store All Documentation https://www.yammer.com/ http://feeds.feedburner.com/office/fmNx application defined or object defined error vba range Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: error 5981 generating word doc from excel Microsoft Office for https://www.guard1.com/Support/KB/Content/Errors/5981-AppDefinedError.htm Developers > Excel for Developers Question 0 Sign in to vote I embedded a word template into an excel sheet to be used as a template for generating a report that gets filled with data from excel. The purpose of the VBA is to open the embedded word document and save it as a new file name to the https://social.msdn.microsoft.com/Forums/office/en-US/3683a542-c9f9-43ea-a429-475dcbb18363/error-5981-generating-word-doc-from-excel?forum=exceldev same location in order not to make changes to the template. I then opens that saved copy and fills in the excel data. The macro works fine on windows, but it only runs once on a mac. The second time you run it you get "error 5981". If I Save the Excel file, close it and then open it again, the macro will run. Anybody see anything wrong with the code? Seems like Im not releasing something if restarting excel fixes the problem. The second time I run it it stops at the following line: wdApp.ActiveDocument.SaveAs Filename:=file_path2 file path 2 is linked to a cell with the following equation:=LEFT(CELL("filename"),FIND("[",CELL("filename"))-1)&"Enterprise "&'Model Inputs'!D7&TEXT((TODAY()),"mmddyyyy")&".doc" Sub GenerateReport()Dim wdApp As ObjectDim wdDoc As ObjectDim wb As Excel.WorkbookDim xlName As Excel.NameApplication.ScreenUpdating = False Const wdGoToAbsolute As Integer = 1Const wdGoToLine As Integer = 3'Define WorkbookSet wb = ActiveWorkbookOn Error GoTo ErrorHandler 'Open Template in word wd = Sheets("Hidden Data").Shapes("Object 2").OLEFormat.Verb(Verb:=xlVerbOpen) Set wdApp = GetObject(, "Word.Application") Set wdDoc = wdApp.Documents(1) Worksheets("Hidden Data").Range(
Technology and Trends Enterprise Architecture and EAI ERP Hardware IT Management and Strategy Java Knowledge Management Linux Networking Oracle PeopleSoft Project and Portfolio Management SAP SCM Security Siebel Storage UNIX Visual Basic http://visualbasic.ittoolbox.com/groups/technical-functional/visualbasic-l/application-defined-or-objectdefined-error-in-vba-980348 Web Design and Development Windows < Back CHOOSE A DISCUSSION GROUP Research Directory TOPICS Database Hardware Networking SAP Security Web Design MEMBERS Paul_Pedant MarkDeVries DACREE Inside-ERP MacProTX VoIP_News Inside-CRM I_am_the_dragon PCMag maxwellarnold Michael http://www.mrexcel.com/forum/excel-questions/506664-application-defined-object-defined-error-excel-2010-a.html Meyers-Jouan TerryCurran Chris_Day JoeTorre Andrew.S.Baker Richard bracke Ramnath.Awate DukeGanote Locutus Nikki Klein Dennis Stevenson Craig Borysowich AbhaiTripathi Clinton Jones bluesguyAZ59 iudithm knowscognosdoi mircea_luca Iqbalyk COMPANIES CloudLock Trend Micro Incorporated Citrix Panaya Inc. View All defined or Topics View All Members View All Companies Toolbox for IT Topics Visual Basic Groups Ask a New Question Visual Basic – General Discussions The VB - General Discussions group is a forum where peers share technical expertise, solve problems, and discuss issues related to the use of the Visual Basic programming language. Home | Invite Peers | More Visual Basic Groups Your account is ready. You're now being defined or object signed in. Solve problems - It's Free Create your account in seconds E-mail address is taken If this is your account,sign in here Email address Username Between 5 and 30 characters. No spaces please The Profile Name is already in use Password Notify me of new activity in this group: Real Time Daily Never Keep me informed of the latest: White Papers Newsletter Jobs By clicking "Join Now", you agree to Toolbox for Technology terms of use, and have read and understand our privacy policy. Application defined or Object-defined Error in VBA sreeraj r asked Apr 11, 2006 | Replies (4) I have generated an Excel report using VB6=2E The excel sheet is populated from an ADO Recordset=2E The report is smoothly coming in my development machine=2E I made my project a package using Package and Deployment wizard and Installed on the Client machine, which has no VB & SQL server=2E When I tried to generate the report, a runtime error such as "Application defined or Object-defined Error" is coming=2E I dont know what to do, since such an error is not coming in the development machine=2E Pls help me=2E=2E=2EThanX Join this group Popular White Paper On This Topic Business Inte
Forums Excel Questions application defined or object defined error - excel 2010 Results 1 to 7 of 7 application defined or object defined error - excel 2010This is a discussion on application defined or object defined error - excel 2010 within the Excel Questions forums, part of the Question Forums category; Hi guys Using Excel 2010 and however I phrase this code I get the above error! I'm looping through a ... 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 4th, 2010,06:59 AM #1 wilcowoods Board Regular Join Date May 2008 Location Sydney NSW Australia Posts 275 application defined or object defined error - excel 2010 Hi guys Using Excel 2010 and however I phrase this code I get the above error! I'm looping through a range and identifying cells that contain data then cpying that data and pasting it into another sheet so that thet copied range finds the next empty cell beside the last row and last column (counting from the bottom and left of the sheet). Here's an extract of the code that's bugging out - I've tried different ways of expressing the range object but even using the cells property with address as below gives the same error: Sub ConfirmSaleAndArchive() Dim Ans As Integer Dim mj As String Dim FinalRow, endrow, endcol As Long FinalRow = Worksheets("Wines").Cells(Rows.Count, 2).End(xlUp).Row endrow = Worksheets("Sales").Cells(Rows.Count, 2).End(xlUp).Row endcol = Worksheets("Sales").Cells(endrow, Columns.Count).End(xlToLeft).Column Application.ScreenUpdating = False Application.EnableEvents = False ' stuff here that works fine -message box requires answer vbokcancel: Select Case Ans Case vbCancel Exit Sub Case vbOK If Worksheets("Sales").Range("A2") = "" Then mj = Worksheets("Sales