1. C

    Windows 11 Excel VBA Paste Error Every Time

    We just upgraded all of our computers to Windows 11. I have a macro used on multiple computers and have had no issues on all of them but one. That one cannot run the macro (or any macro) that includes a paste of any kind. I have tried the simplest copy and paste and it fails. Excel throws a...
  2. sashapixie

    Synch slicers VBA - object defined error

    Hello I have two datasets: Dataset 1 Contractor Skill Dataset 2 Contractor Project I have a slicer for both datasets for contractor and i have a slicer for skill. What i want to do is when the skill slicer is selected which in turn updates the contractor column / slicer in the pivot...
  3. T

    Error 1004: union failes

    Hi, I'm trying to split up an Excel in several excels based on a list of values in another Excel. Let's show an example: You see that in the top left Excel there is a list of values. My script starts with the first value 'binnendeuren' and search that value in the first 3 columns of the...
  4. S

    Runtime error 1004 when save as

    So the function is working as how I intended, just that after it finishes saving as it keeps the last workbook opened and the last created worksheet still opened. how do I prevent the error from popping up? Sub CreateBranchSheets() Dim BranchField As Range Dim BranchName As Range Dim NewWSheet...
  5. A

    error 1004 cannot set locked property of range class

    Theres no merge cell in this sheet. That sheet is locked. Private Sub Worksheet_Change(ByVal Target As Range) If Range("A11") <> "" Then Range("B1:L11").Locked = False ElseIf Range("A11") = "" Then Range("B11:L11").Locked = True...
  6. R

    "Error 1004 AdvancedFilter Method of Range Class Failed"

    I am trying to run a User Form I just created and keep getting stuck on this error in my Advanced Filter. I have confirmed the data and range information but can't get past this. The exact same code runs fine in a different user form. Any ideas for a newbie vba user? Sub AdvFilter() On...
  7. X

    Manual Ctrl+C to copy from excel, VBA to paste values in specific range in different workbook (Getting 1004 error)

    Hello, I've been struggling with this for hours now. I believe the solution is simple, but I can't figure it out. The complete steps being taken are as follows... Open external workbook Manually select range (which varies often) Press Ctrl+C or right click select Copy, to copy selected range...
  8. I

    How to have a message box appear if referenced workbook name is not correct?

    Hello. I made a long macro for myself and coworkers that references one static workbook multiple times. However, I have to edit the coding behind it once in a while and resend it. When this happens they are told to delete the others and make sure the name is the same. However, some are not tech...
  9. O

    Excel VBA create listboxes not working - error 1004

    Hi, Done some searching and sheet is not protected as others have had the issue with - its just being created as a new workbook. So this is part of a word macro I am updating that I wrote before, but inside the macro I call the Excel creation function. The goal is I want to create an excel...
  10. S

    Run-time error '1004

    Hello Experts: I have a rather irritating problem that does not make sense to me and I am hoping that someone can help please. I have some code that: Creates a list of files to be opened Opens each file in the list and scrapes some specific data from each file opened if present Places the...
  11. G

    VBA Loop for copy and paste with search

    Hi There, Thank you in advance for taking the time to read this. I've tried to search for the answer but to no avail so I'm hoping some very kind person will be able to help put me out of my misery. I'm trying to search for a specific term within a column of a worksheet, if that is found...
  12. D

    Please Help! Run-Time error 1004; Method range of object worksheet failed.

    Hello, I am in the process of transferring a lot of the sheet calculations and conditional formatting into vba for efficiency and in the process I am receiving an error that I cannot seem to figure out, "run-time error 1004; method range of object worksheet failed". I have attached all the...
  13. 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...
  14. 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"...
  15. 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...
  16. 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...
  17. 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...
  18. 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 =...
  19. 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...
  20. 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...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back