run-time error '1004'

  1. Ottsel

    Run-time error when using Worksheets("Sheet1").Activate

    I'm using the following code before running my script to help cover any errors, as people sometimes add spaces at the end of titles causing my macro to crash so, before running I was attempting to make sure the sheet - which the name never changes - would be selected before executing to avoid...
  2. markkeith

    VBA range.formula2 error when using dynamic array formula SEQUENCE

    I'm trying to use the SEQUENCE formula in the code below but getting a run-time error. Am I missing something in my code? Private Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents = False Application.ScreenUpdating = False If Not Intersect(Target, Range("startDate")) Is...
  3. C

    Error help - Get data from a closed workbook (without opening)

    Greetings - I'm asking for help resolving the error(s) I get below or finding another solution to my goal. Goal: VBA to get the values from cells 'A1' and 'A2' on 'Sheet2' of the XLFileName workbook (without opening) and assign them to the variables TotColumns and TotRows. My code is...
  4. S

    Run-time error '1004': We Can't do that to a merged cell

    I wrote a VBA code that was working until a few days ago now I am getting an error message that is can't do that to a merged cell when trying to copy and paste. However, there are no merged cells in the section that is being copied and pasted. Below is the code that keeps throwing the error...
  5. Small Paul

    Paste Special - Run-Time Error 1004

    Hi I am having difficulty with a Paste Special line in my VBA and cannot work out why. I have searched various websites and tried a load of different things, without success! The section of code is: Worksheets("Required Data").Activate ActiveCell.Offset(0, 2).Copy detail = ActiveCell.value...
  6. D

    Run-time error '1004': Method 'Activate' of object '_Workbook' failed only on new PC

    Hi Folks, I have an old excel model last modified in 2010 that was written by a pretty decent VBA / SQL programmer who has since deceased. All our old machines are running Windows 7 professional on a 64 bit OS using 32 bit Excel 2013 (8 gb RAM). A new PC installed recently runs...
  7. D

    Loop not working - Run-time Error '1004': Select method of range class failed.

    Hello All. I have an issue in my loop and I have no idea why it's not working. Can anyone please help me. It's the only thing (so far) holding me back from completing this project. In my Payroll project there is a time, every 2 to 3 years, our Government National Insurance Service (a.k.a. NIS)...
  8. H

    Macro's not working on Mac - Run-time error '1004'

    I built macros to automate a sales reporting process. I am leaving the company and trying to ensure the sales report will be usable after I leave. My boss who will be running the report uses a MacBook Air. When I run the macro, the first error that comes up says "Print - Error while printing"...
  9. mdfahiem

    Run-time error '1004' for a scroll bar (form control)

    Hi Gurus, I have a scroll bar (form control). There are cells which are updated based on the scroll bar value. I want to protect the work sheet and I have selected the cells to be protected and have them Locked in format cells --> Protection. When I scroll to next level, below message is...
  10. C

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

    Hi. I am having an issue with a macro I wrote that reformats a report I receive in Excel. One of the commands looks for the blank cells in column A and based on the content of column C, enters the appropriate value. Frequently, when I run the macro I get "Run-time error '1004'...
  11. DPChristman

    Macro Issue

    I am trying to rung a 'save as file name' macro, and getting the error: Run-time error '1004': Microsoft Excel cannot access the file c:\program files (x86)\microsoft office\office 14\91cd6000. there are several possible reasons: -The file name or path does not exist. -The file is being used by...
  12. M

    Run-time error '1004': Select method of Worksheet class failed. Help :)

    I'm trying to loop through my sheets and when I get to the 8th sheet, it has this error: "Run-time error '1004': Select method of Worksheet class failed." Anyone see my mistake? It works great through the first 7 sheets, not sure why it wont continue. My Code is: Sub...
  13. 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...
  14. T

    Run-time Error 1004 - But everything is the same!

    Hello everyone! Long time reader first time poster here... I have a macro that pulls data from a table into a pivot table and then sorts it. I use the same process/code 4 times so that I can break up the data into 4 separate pivot tables. The code I use for the first 2 pivot tables works fine...
  15. 2

    VBA Hell

    Here is my code Sub SaveWOWithNewName() Dim strNew As String Dim F5 As Range strNew = "C:\Users\AdminAssist\Dropbox\Work Orders\Work Order Index\@1.xlsm" Application.ScreenUpdating = False With ActiveSheet Set F5 = .Range("F5")...
  16. N

    Run-Time error '1004':

    Have some code that should determine users My Documents path, Create a New Folder in their documents, then save a newly created PDF document in that folder. It runs fine on my system. When other users try to run it, they are getting: Run-time error '1004': Document not saved. The document...
  17. I

    If Statement Formula not working when recorded in a Macro

    Hello, I am new to posting in this forum and fairly new to Macros/VBA so please excuse me if I miss anything. I created the following long formula that gets me the info I need to create an accounts receivable aging report: =IF(X2="CM", "Credit", IF( X2="PMT", "Unapplied", IF(X2="INV"...
  18. H

    RTE 1004 when filtering pagefield via macro

    Hello, I am currently trying to make a simple button that filters a PageField in a Pivot table. Worksheets("SN VIEW (2)").PivotTables("SN").PivotFields("DELIVERY SEQUENCE").PivotFilters.Add Type:=xlCaptionContains, Value1:="*ONSITE*" This will give me a Run-time error '1004'...
  19. J

    Mac recorded Macro does not work with windows. Run-time error 1004

    Hello all, I have been given a macro recorded on a mac and it works fine with Mac Excel 2011. Unfortunately, I need to make it to work on a windows machine, but it comes up with an error message "macro unable to set width property of the window class. Run-time error 1004". When I press debug...
  20. H

    Excel macro issue - Run-time error '1004' Method 'SaveAs' of object '_Workbook' failed when trying to save file via macro

    Hello, I am posting this question to the forum after reviewing several other posts trying to find a solution with no success. OS - Windows XP Office version - Office 2010 What the issue is - I have developed an Excel 2010 template with macro's (.xltm) that has some sales data pasted into it...

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