1004

  1. M

    1004 error on Macro to Delete All Names in ActiveWorkbook

    Hi- My Company's software macro creates hidden names in our workbooks making them clunky and unnecessarily large, so I am trying to get a macro to first unhide all names in the name manger, then delete all, except the print range. Except I am gettin a 1004 name syntax error on the n.Delete...
  2. A

    Runtime Error 1004: Unable to get pivotfields property of the PivotTable Class

    Hello Community, Looking for a little VBA love. Current macro simply done by recording. So I couldn't screw up the language code. I have 2 sheets: 1 for Brands and Brands Top Gain Loss. I would like to get rid of one sheet and allow a macro for Sort by "Dollar Sales" and "Dollar Sales Chg YA"...
  3. B

    Can't add "=" before Cells.Value equation [VBA] 1004 Error

    I have a dynamic equation that is filling across multiple cells, so until the equation is completely generate, I have not included the "=" sign at the beginning. I thought adding it would be as simple as Cells(i,j).Value = "=" & Cells.Value, but this does not work. I have tried the same thing...
  4. FracinDean

    VBA Code to Retrieve Default Values for Empty Cells

    My objective is to use the Worksheet_Change event to test if any cells requiring a value have been cleared, and then to retrieve the default values and put them in the cell. All the cells requiring a value have a named range, and all the default named ranges are the same, except with the...
  5. J

    Unable to set the currentpage property of the pivotfield class

    Hi there, Leveraging some posts online, I have created a macro that should allow the user to make filter selections on one sheet while having the actual pivot table on another sheet. Sub Update_Pivot() Dim ws As Worksheet Set ws = ActiveWorkbook.ActiveSheet Dim wsname...
  6. F

    Macro works perfect on xls.files but not on xlsx.files

    Dear All, Run time error 1004 when using sheet with more than 65000 lines .xlsx ). Even if they are not used. I fear it has to do with the way I search the last used row. Endrowhelp = Firstref.Column Cells(50000, Endrowhelp).Select Selection.End(xlUp).Select myEndRow =...
  7. D

    Error 1004 Help. I'm over my head!

    Hello everyone, First time poster to the board and fairly new to VBA macrosfor excel. Please bare with me on this post if it is confusing. I have managed to Frankenstein together code that allows fora worksheet to be created based off of a template sheet, followed by adding anadditional...
  8. R

    Run-time error '1004': Application-defined or object-defined error

    Code for work, so posting just some of it.. Code that matter for function: public function compare(...,table As Range) dim i as integer i = 1 table.Cells(i,1).value = "Test" end function Throwing error "Run-time error '1004': Application-defined or object-defined error" Any ideas on why this...
  9. M

    Runtime Error 1004

    I keep getting a Runtime Error 1004 with a particular macro. The debug option always take me back to the "UsedRange" portion of: If ws2.Range("A:A" & Rows.Count).End(xlUp).Row > 4 Then ws2.UsedRange.Offset(4).Clear What's so frustrating is that if I copy and paste the contents to a brand new...
  10. K

    VBA 1004 error - range, insert row.

    Hi all, I am totally new to VBA, its my first code. I wanted to create macro which could insert a row after finding different value. I managed to write something like this. Could you pleas check what is causing the error 1004 - Application defined or object-defined error? Sub InsertRow() Dim...
  11. U

    2 Workbooks, updating 1 Value [Err 1004]

    I receive an automated report and use it to update an internal file for my department. All columns are formatted almost identically between the two sheets (at least for the two criteria I am working with). My goal is to have a macro that will update our internal file to match the information...
  12. Q

    1004 Error. That name is taken

    Hi team, Code below. I t is meant to run through the work book and format the Tab name with the name in D6. It has been working fine for a couple months but now it refuses to budge from this error on this line. There are on 10 names that appear repeatedly. Sub Tab_name() Dim ws As Worksheet...
  13. F

    Pastespecial method of range class failed 1004

    Hi, I have 2 sets of code. One copies the form and the second pastes it. (the ancillary functions are sheet hide unhide etc) The problem is, at times the codes work perfectly fine. But sometimes i get the "pastespecial method of range class failed 1004" error. I have created an excel ribbon...
  14. C

    Runtime 1004: Range class method failed

    Hi MrExcel Forum, First time poster (to any forums), was wondering if anyone can help me with this tiny bit of code on here. I see similar issues posted to the forums but nobody says what the underlying cause is so I'm not sure how to fix my particular situation. What I want it to do: Go...
  15. A

    Macro works in Excel 2013 but not in 2016, Run-time error '1004'

    I am a complete noob to VBA. We have a macro that runs fine on Excel 2013 but gets a Run-time error on 2016. The part of the macro where it hangs up is trying to copy and paste merged cells. The error states "To do this, all merged cells need to be the same size." They are the same size. It...
  16. S

    Run-time error '1004' Application-defined or object-defined error

    I'm having some VBA problems. I've used the below code many times before on other workbook (just changing the specific parameters for each sheet)without any problem. However now I'm begging the "Run-time error '1004' Application-defined or object-defined error" error for the "East Mezz Input"...
  17. E

    Overflow Error Been Replaced with 1004 error

    So I have a very large worksheets(400000 + in length 8 variables) that have the price for a stock and i want to organize it into a worksheet where all cells are side by side. I trouble shooted through until I got it to work for about half of the data set until it said overflow error. I check to...
  18. S

    For Each inside another loop works only once after excel startup

    Hello guys, I have an macro I am fighting last 5 days with no luck. I am doing FOR loop every row filled and hidding shapes (pictures) based on value in Column C in every row. So far I am only in stage that I wish to FOR loop of all shapes and hide or show (just to test that everything works...
  19. C

    Excel 2016 VBA Hyperlinks Problem to Index sheet

    Appreciate help with understanding how a VBA macro that works fine in Excel 2010 and 2013, but that generates an error (Run-time error '1004': Application-defined or object-defined error) when executing in version 2016 explicitly. The macro is embedded with a sheet in a workbook (the "Index"...
  20. Y

    VBA Error 1004 when trying to put equals sign in cell value

    Im trying to do something like this "om" is the if formula but in my language Range("f3").Value = "=OM(+'1'!H3=0;"";+'1'!H3)" and for some reason i get the 1004 application or object defined error when i do this the first line of code works but the same error appers on the next line, why...

Some videos you may like

This Week's Hot Topics

Top