runtime 1004

  1. N

    Runtime error -2147417848 (80010108) method value of the object range failed

    Hi I am trying to save the data into the MainInventory but unable to do as I keep getting this error When my sheet is empty and insert the second row as my first row is headers row the data is inserts fine everything works fine but as i enter the third row this pops ups and my vba closes and...
  2. A

    Unable to get the PivotFields property of the PivotTable class

    Hi All, Facing issue with creating pivot table in loop. It's giving error: "Unable to get the PivotFields property of the PivotTable class" Here's the code: Sub PivotTableLoop() Dim ws As Worksheet Dim PivC As PivotCache Dim PivT As PivotTable Dim Table As ListObject For Each ws In...
  3. G

    runtime error 9 - Subscript Out of Range Error or runtime 1004 - method 'range of object' worksheet failed when trying to color cell

    Hi, I have a vba code that is intended to highlight cells based on value of the cell i.e. if it is empty. The code identifies the cell values correctly but it will not colour the cell. I keep getting an runtime error 9 - Subscript Out of Range Error or runtime 1004 - method 'range of object'...
  4. D

    Unable to get Countifs property of the function class error

    Hello, I am getting the aforementioned error with my code, and I have absolutely no clue why. Any help would be appreciated I'm clearly not understanding something. [CODE=vba]Sub MonthlyAdd() Dim Category(7 To 10) As Variant Dim Ar As Variant Dim Br As Variant Dim Catgry As String Dim i As...
  5. O

    Bypass runtime error 1004

    Hi All, This probably sounds a little silly, due to built in functions and security measures to stop Excel from going mad, but I have the error box (image attached) come up, and I was wondering if i could by pass it by adding some code to my existing VBA. So my code currently finds a set of...
  6. N

    VBA Application or object defined error

    I have created the following code to extract information from an excel table. But I am getting an error exactly at the if statement. I have even tried executing the code from a module and even from the worksheet level. I have read about this issue and it seems that selecting the sheet seems to...
  7. A

    Can't find my run time error

    Hi everyone, So I have this userform for data entry (image below). The problem started when I add the "Delete selected row" button. When I tried adding and deleting a rows, it works fine the first few times, but then, the error message (2nd image) popped up around the 5th or 6th addition. Do...
  8. E

    Debug after running macro

    I have a macro that I have assigned to a button which looks at a certain range of cells formatting, and upon clicking on the button, it copies the cell formatting of the range, and copies it to another range on the same page and also other cell selections on another sheet. I also have some VBA...
  9. E

    Range of Objects Error

    I'm running into a Range of Objects Worksheet Failed Error for some reason and I cant understand why. All I did was add the following code to the set of ranges in the Target Range in the sheet code, and all of the sudden I'm having errors when entering text into the any of the cells within the...
  10. S

    Always running into Run-Time Error '1004'

    Hello everyone, I have been running into a VBA runtime 1004 'Application-Defined or object defined error' Below are the code that have the issue. The weird thing is that when I open the workbook they will never run the first time, but after I run it couple times, they will magically happened to...
  11. A

    VBA SaveAs RunTime Error 1004

    Hello, I keep receiving RunTime Error 1004 at the saveAs line of my code. The code is below. I have tried multiple different solutions people have posted, but it doesn't help. Private Sub CommandButton1_Click() Dim Path As String Dim Name As String Dim Loc As String Set wb = Workbooks.Add...
  12. J

    VBA Runtime Error

    Hello Everyone, I am having a slight issue with some code I am trying to run. Some backstory: This VBA is from a spreadsheet that creates some tabs when executing the macro/clicking on macro button with the ultimate goal of pulling text from a .txt that is updated daily. This code is part of a...
  13. 3

    Columns function - object-defined error

    Hi, I have the following procedure: Sub store_Dict() Dim key As Variant Dim myDict As New Dictionary Set myDict = CreateDictFromColumns("Sheet1", 1, 4) For Each key In myDict.Keys Debug.Print "Key = ", key, " Change = ", myDict(key) Next End Sub Where UDF CreateDictFromColumns is...
  14. A

    Runtime 1004 Error SaveAs Workbook Failed

    Hi, I'm quite new in vba and I was hoping someone could help me. I have the following code, that saves a copy of a sheet "Loading Form" using as a name a value in cell C7: Sub SaveITWithNewName() Dim NewFN As Variant If Range("C36").Value <= 0.8 Then MsgBox "Truck not full" Else...
  15. J

    Special Cells - Delete Visible Rows using VBA code. Run time Error 1004

    Hi, Thanks for your time. I am trying to run the below macro code and have no issues till the last line (Macro 2) where all i want is to delete visible rows (special cells). The last step either runs for 10-15 mins to complete the action or throws out at error (Runtime error 1004). Also if...
  16. E

    Run-time error 1004 - No cells were found

    Hi all, Hoping someone can help! When running the macro below, I am getting a run-time error 1004 - No cells were found error. I have tried diagnosing this issue myself, but am at a loss. This macro worked perfectly on the worksheet it was originally created on. So I used that worksheet as a...
  17. E

    Runtime error 1004 when running a macro

    Hi everyone, When running a macro, I am getting the following runtime error: Run-time error '1004': Method 'Range' of object '_Worksheet' failed When I click 'Debug', it takes me to the line of code that isn't working, which is highlighted in blue below: Dim ary As Variant Dim i As Long...
  18. B

    Runtime Error '1004'

    I keep getting the following error and I don't know why: Runtime Error '1004': Method range of object global Failed Here is my code with the line causing the issue denoted with the *. Sub Button1_Click()ActiveSheet.Range("AL2:AL399").Value = 0 ActiveSheet.Range("BH2:BP399").Value = ""...
  19. B

    No AutoFill because of data constraint

    Hi there! I'm getting a runtime 1004: AutoFill method of Range class failed. I'm sequentially adding to a data set, so the last row containing data will change from day to day. However, the size increase is variable so, unpredictable. If column B is longer (more rows) than column C, the...
  20. M

    Run-time error 1004 : Unable to get Vlookup property of the WorksheetFunction class

    Hi, I am getting a Run-time error 1004 : Unable to get Vlookup property of the WorksheetFunction class. I am trying to use a vlookup to find an employee’s name from their employee number and put that into a welcome statement message box. The “Me.txtUser.Value “ in code below is where the error...

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