Excel Application Defined Or Object Defined Error 1004
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 runtime error 1004 application defined or object defined error excel of this site About Us Learn more about Stack Overflow the company
Excel Macro Run Time Error 1004 Application Defined Or Object Defined
Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges
Run Time Error 1004 Application Defined Or Object Defined Error Excel Vba
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; it only takes a minute:
Application-defined Or Object-defined Error Excel
Sign up VBA - Run Time Error 1004 'Application Defined or Object Defined Error' up vote 2 down vote favorite 1 I have an excel document that copies a template sheet into a new sheet on the first time it runs. Any more sheets that follow this template are appended to the newly created sheet. I'm getting the error in the title application-defined or object-defined error vb6 in this section of code: If Worksheets("User Configuration").Cells(9, 15).Value = 1 Then Worksheets("Cable Cards Template").Range("A1:J33").Copy With Worksheets("Cable Cards") **.Range(Cells(RangeStartRow, RangeStartColumn), Cells(RangeEndRow, RangeEndColumn)).PasteSpecial xlValues** .Range(Cells(RangeStartRow, RangeStartColumn), Cells(RangeEndRow, RangeEndColumn)).PasteSpecial xlFormats End With Worksheets("Cable Cards Template").Shapes("Picture 1").Copy Worksheets("Cable Cards").Paste Cells(RangeStartRow, RangeStartColumn) Call Sheets.FormatCableCardRows End If Basically if the IF statement is true (the cell = 1), then a range on a particular sheet should be copied and pasted into the new sheet at the range given using pastespecial for values and formatting. Following that, the "newly created" sheet should have an image copied into the top left cell of the template and then a subroutine is called to format the rows of the new sheet. I'm getting the error at the first .Range call after the with worksheets("cable cards") statement. I've tried not using the with statement, copying values directly instead of paste-special etc. The weird thing is that this will run on the first go (when the new sheet is created via: If (RangeStartRow = 1) Then Worksheets.Add().Name = "Cable Cards" ' Create new sheet with given name only on first cable card Columns(1).ColumnWidth = 9.43 Columns(6).ColumnWidth
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 Add-in Availability Office Add-ins Changelog Microsoft Graph API Office 365 application defined or object defined error 32809 Connectors Office 365 REST APIs SharePoint Add-ins Office UI Fabric Submit to the Office application defined or object defined error access Store All Documentation https://www.yammer.com/ http://feeds.feedburner.com/office/fmNx Office VBA language reference Visual Basic language reference Error Messages Error Messages Application-defined or object-defined error application defined or object defined error vba range Application-defined or object-defined error Application-defined or object-defined error #Else clause must be preceded by a matching #If #Else If, #Else, or #End If must be preceded by a matching #If #ElseIf must be preceded http://stackoverflow.com/questions/20601805/vba-run-time-error-1004-application-defined-or-object-defined-error by a matching #If or #ElseIf and followed by an #ElseIf, #Else, or #End If
be down. Please try the request again. Your cache administrator is webmaster. Generated Sat, 15 Oct 2016 09:40:56 GMT by s_wx1131 (squid/3.5.20)
Forums Excel Questions How to fix : vba runtime error 1004 application defined or object defined error Results 1 to 5 of 5 How to fix : vba runtime error 1004 application defined or object defined errorThis is a discussion on How to fix : vba runtime error 1004 application defined or object defined error within the Excel Questions forums, part of the Question Forums category; Hi, I have been working on a set of data in excel for the past few days now. I am ... 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 Mar 14th, 2011,08:14 AM #1 crunchie New Member Join Date Mar 2011 Posts 8 How to fix : vba runtime error 1004 application defined or object defined error Hi, I have been working on a set of data in excel for the past few days now. I am using a custom filter to get the data i want and then paste that data into a new worksheet. It was working fine untill today and now i cannot even select a row of cells without the error turning up. Here is the code i am trying to use; Code: Sub RevisedResults() Sheets("Test_Formatting").Select Selection.AutoFilter Field:=4, Criteria1:="<>*car*", Operator:=xlAnd _ , Criteria2:="<>*plane*" Selection.AutoFilter Field:=5, Criteria1:="no" Range("A1").Select Columns("A").ColumnWidth = 20 Range("B1").Select Columns("B").ColumnWidth = 37 Range("C1").Select Columns("C").ColumnWidth = 20 Range("D1").Select Columns("D").ColumnWidth = 125 Range("E1").Select Columns("E").ColumnWidth = 13 Range("F1").Select Columns("F").ColumnWidth = 13 Range("G1").Select Columns("G").ColumnWidth = 13 Range("H1").Select Columns("H").ColumnWidth = 19 Range("I1").Select Columns("I").ColumnWidth = 15 Rows("2:2").Select Selection.Insert