error 1004

  1. W

    Run time error 1004 - cannot sync slicer caches with different size

    Hi, I get run time error 1004 when I run the following code, which should synchronize the slicer caches: Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)Dim sc1 As SlicerCache Dim sc2 As SlicerCache Dim si1 As SlicerItem Set sc1 = ThisWorkbook.SlicerCaches("Slicer_SolName")...
  2. C

    run-time error 1004 Unable to get the PivotFields property of the PivotTable Class

    I'm running into a strange problem, for many years I have used these excel macros and all of a sudden I started to receive errors that only appear on one computer. This macro and pivot issue doesn't exist on any other computer I have tried. So excel was uninstalled and a fresh clean updated...
  3. C

    File Dialog Excel 2013 Error

    Hi, I have the below code that is working for most of my users but is crashing in the red line for some of the users. The only common trend I've found for those that this is not working is that they are Excel 2013 users as everyone else is Excel 2010. The Excel 2013 users have a run-time error...
  4. G

    vba - copy filtered data to table

    Hi guys, I try to filter data that I have in Macro file in DataSheet ('DS'). I need to take filtered data only (w/o header row) & copy it into different workbook/sheet 'SFDCReport', where there is a Table (Header row on line 12, 1 data row on 13). With this code, I received some Error 1004 -...
  5. andrewb90

    can't hide cells using vba when sheet is protected

    Hello all, I have a worksheet change event that hides/unhides rows, but when my sheet is protected it doesn't work. now, the sheet is protected in vba uing this: ActiveSheet.Protect "password", _ DrawingObjects:=True, Contents:=True, Scenarios:=True _ ...
  6. G

    Run-time error '1004' While trying to generate PDF

    Hello all, I am encountering the following error message when I try to generate a PDF from a checkbox list of multiple sheets. "Run-time error '1004': Document not saved. The document may be open, or an error may have been encountered when saving." Any help would be appreciated with helping...
  7. Z

    i try advance filter but i get error 1004

    Sheet4.Range("C8").CurrentRegion.AdvancedFilter Action:=xlFilterCopy, _ CriteriaRange:=Sheet4.Range("AM6:AO8"), CopyToRange:=Sheet4.Range("AQ8:AT8") i cant seem to find whats wrong with the codes. can anyone help me with this code. all my table headings is all the same
  8. B

    Writing an Array to Range causes error

    Dear Experts, I have a large array I need to dump to a range. I read that there are limits on the size of array you can dump, so I wrote this sub to prevent writing too much to the sheet at once. I still get an error when writing row 1385, column 11. This item of data is a string that is...
  9. W

    Export as pdf button broken

    I have a button that uses the following code to print the information in the range of cells to a PDF: Private Sub CommandButton1_Click()ActiveWorkbook.Worksheets("Sheet1").Range("L2:L35").ExportAsFixedFormat Type:=xlTypePDF, _ Filename:=Filename, _ Quality:=xlQualityStandard, _...
  10. M

    Error 1004

    The following code works when I execute it from the WB workbook but returns error 1004 when I run it from WBi workbook I need to run it from WBi Woorkbook. Thx for the help in advance Option Explicit Sub MatchCopy() Dim WB As Workbook Dim WBi As Workbook Dim...
  11. H

    Run-time error 1004 when trying to insert VLOOKUP in cell

    Hi, I'm trying to insert in a range a VLOOKUP formula that will return data from another closed workbook but the line where the formula is inserted returns error 1004 Here is the code: Sub insFormula() Dim c As Range Dim LastRow As Integer With ActiveSheet LastRow = .Cells(.Rows.Count...
  12. E

    Prevent Error 1004 "Method 'Save As' of object' Workbook' failed"

    I am using an input box to allow a user to create a new file name. The code works well until the user returns to the process and errantly tries to re-create the same file name. When that occurs the Run-time error '1004" msg appears "Method 'Save As' of object'_Workbook' failed. Does anyone...
  13. N

    VBA coding issues

    Hi All, Wondering if you could help me out - I am completely brand new to VBA. I am trying to get specific data to automatically transfer into another worksheet table. I keep getting a 1004 error on the code It would be really great if you guys could help me on this one, thanks! The code...
  14. M

    Error 1004

    I am trying to create a column "H" that will display the values in column F unless F is empty. In such a case, the value from column E will be entered into column H, however I am new to using vba and am not sure how to fix this macro as it continues to fail on the first line "If...
  15. L

    Can you delRange.Cut as well as delRange.Delete?

    Hi Everyone, I hope this will make sense but rather than find, select and delete a row of data in my workbook I wish to cut that data and move it to a secondary tab instead. To explain a little more… In my workbook I have a ‘Master Database’ tab which contains only the most recently entered...
  16. V

    Error 1004: AutoFilter method of Range class failed

    I am using same code in three different functions and it's working fine with two of them but with third one it's giving me "Error 1004: AutoFilter method of Range class failed". I have a long code and I am getting error in this part of the code: - Code:- Public Sub XYZ (fcstartdate As Long...
  17. M

    VBA Run-time Error '1004':

    Hi All, im hoping you can assist me with this error im getting. Run-time Error '1004': Application-Defined or Object-Defined error the code I've used is below, and the problematic part is in bold. any help will be greatly appreciated. Sub Save() Dim shFrom As Worksheet, shTo As...
  18. C

    sumifs, $

    Hi I am having trouble with my sumifs in vba. It is returning error 1004. I think that it is due to one the word that it is referencing as it has the symbol $ after the word Overtime. I have tried the following: 1. putting in " - however that didn't work as it then reads the characters and...
  19. D

    Naming fields loop getting 1004 error

    Hi, I have a loop inside a Sub that copies and pastes values and cell names into a new workbook. Randomly, the loop stopped working. I haven't adjusted this code or any of the cells that it's looking at, so it's very strange. It's causing the Object error 1004. The code is below and I've...
  20. A

    [vba] Run-Time error '1004'- Method 'Range' of object '_global' failed

    I'm getting an error on a vba code I'm trying to write. For i = 1 To 8 Range(Cells(2, i + 1), Cells(lastrow1, i + 1)).Select Selection.Copy Workbooks("Querypartlist.xlsx").Activate Range(Cells(1 + lastrow1 * (i - 1), 1)).Select (THIS IS SPECIFICALLY...

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
Back
Top