run-time '1004'

  1. S

    Trying to drag down vba formula - getting global error

    Trying to run the following function to drag a formula I insert into a cell: Dim LastRowMaster As Long Sheets("Master").Select numRows = Range("A1", Selection.End(xlDown)).Rows.Count LastRowMaster = Sheets("Master").Cells(Rows.Count, 1).End(xlUp).Row Range("j2").Select...
  2. S

    Run-time Error 1004 - Range 'Visible' of object '_Worksheet' failed

    Hey team, Hopefully this is an easy one to solve, but sitting here scratching my head on this one. When I run the below code, I get the following error and can't seem to figure out why... Error Run-time error '1004': Method 'Visible' of object '_Worksheet' failed Background Macro that I am...
  3. Z

    Help Debug Issue with Macro Code

    I am using the below code to cleanup a bunch of workbooks. I came across a workbook that does not have any data inputted below row 1. Row 1 contains the headers. The macro keeps throwing the generic error "Run-time '1004': Application-defined or object-defined error". Clicking the debug issue...
  4. O

    Method Range of object _worksheet failed - run-time error 1004 when populating a range

    I am running through a bunch of workbooks, opening them, identifying one sheet in each book and want to copy the sheet to an array. I have declared the range earlier: Dim rT(10) as Range ... ' Run through the number of files from 1 to antT (which is declared and working) For y = 1 To...
  5. B

    VBA: Search for values in a column and copy row to a new sheet for all matching values

    Hello, I am writing a macro in Excel VBA to search for a string (stored in column A) in column B and then paste the row where the match occurs in a new sheet. I started working off of this tutorial, which had almost everything I needed. The difference is that the value I'm searching for in...
  6. K

    Run-time error '1004': Microsoft Excel cannot paste the data.

    Hi, I have a macro to open files -> copy data from a1:b800 -> put it to general file and doing solver function. But when I'm start a macro I'm get back information "Run-time error '1004': Microsoft Excel cannot paste the data." Frequency of this message is 80% of time when I'm start a macro. I...
  7. J

    Run-time error 1004: No cells were found

    Hi there gurus, I have data being sent to a trending spreadsheet, which of course has been building in size over time (now up to about 430 rows), and just this week the macro has stopped working. I am now presented with the following error code: "Run-time error 1004: No cells were found" Can...
  8. C

    Code works fine once, but not twice

    Hello, all! I am taking my first baby-steps on visual basic. I need one main file (Tax_Receipts) to get data from two other files ("Amount" and "Contact"). The main file has sheets named as the two other files. I am creating a macro to clean the data on those two sheets and then get the new info...
  9. M

    Run-Time Error 1004 with Copy/Paste VBA

    Hi I'm trying to write a code that will copy data from a specific column in one workbook and paste that data in another workbook that has a matching column heading. In this case I'm copying data from one column with the heading "dog" to another column with the heading "dog." I will not always...
  10. A

    For...Next Loop Sticking

    I am using the following code to delete the header from each worksheet in a large Excel workbook. The code is running fine until it gets to one specific worksheet, then I receive the following error message: "Run-time error '1004': Select method of worksheet class failed". I have inserted this...
  11. C

    Run-time error 1004

    When I run the following line of code I get the following error "Run-time '1004': Application-defined or object defined error" Range(found2, Cells(Arow, found).End(xlDown)).Offset(1, 0).SelectHowever, if I run this code without the offset property , I don't get an error. I am trying to copy...
  12. VygonDBA

    VBA Run-time error '1004'

    Hi all, I've created a form with three VBA functions actioned via 2 macro enabled buttons which when tested prior to going live and up until today worked perfectly however......now I'm getting the above run-time error with the following message when I click my macro enabled 'Save' button which...
  13. N

    With Selection.Borders(x1EdgeTop)

    Hello, I am having some trouble with VBA. I am trying to write a sub that will make the border thick if a certain cell is not empty, and thin if a different cell is not empty. I can't seem to use the "With Selection.Borders(x1EdgeTop) twice. If B.Value <> "" Then With...
  14. U

    Run-time error '1004': Delete method of Range class failed

    I am trying to delete rows that DON'T contain certain names, the code I currently have is: Function IsMember(v As Variant, vArray As Variant) As Boolean Dim vLoop As Variant For Each vLoop In vArray If v = vLoop Then IsMember = True Exit Function...
  15. B

    Run-Time Error 1004 Printer not Detected

    Hi, I will make this short and sweet. Here, at my place, I have around 10 printers. Not connected at the same time. I have my Main Printer (Brother MFC-255CW) to print from Excel with a macro. An hour ago, I "Removed" from "Devices and printers" all of my printers, then replugged them one by one...
  16. D

    VBA Pivot Table Update Run Time Error

    Hello, I am creating the report that is updated daily and need assistance with dates in Pivot Tables within the report. I have one sheet within the report that is for service call aging and contains two pivot tables on it for one and seven days. Our reporting system runs one day behind, so...
  17. J

    Manipulate Data if Column contains a "Value" in macro

    Hello All, I have a large inventory sheet. My macro currently sorts all of the data by many traits and converts necessary cells to number format and numeric values. I need it to copy and paste only certain data into another sheet. The code below works well when the "string" is present in the...
  18. R

    vba to import worksheets from folder was working yesterday but not today

    Hi All, Any help would be gratefully received on this. I have a macro which loops through various worksheets that are contained in a directory and copies them into a master workbook. The problem is that yesterday my importloop macro was working perfectly but now I am receiving Run-time...
  19. N

    Run-time error '1004': Shared Workbook and Macro

    Hello All, I am having an issue with a macro abd sharing a workbook. The macro enables me to using grouping while protecting the worksheet. Here is the code: Private Sub Workbook_Open() Dim wksht As Worksheet For Each wksht In ThisWorkbook.Sheets With wksht .EnableOutlining = True .Protect...
  20. T

    Sort problem - activesheet

    Hi there, I wonder if anyone can help, I have part of a macro getting run-time error '1004', trying to sort columns J:K in a workbook with multiple sheets of similar format. Here is the code that gets stuck at ".Apply": Columns("J:K").Select Application.CutCopyMode = False...

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