Hi there!
I'm currently getting run-time error 1004: "Unable to get the CurrentRegion property of the Range class" within following subroutine:
Sub clearData()
Dim modDataRng As Range
Set modDataRng = Sheet2.Range("B4:B7")
If WorksheetFunction.CountA(modDataRng) > 0 Then...
Hi,
I have a column of data in which some cells contain =@SIPP LIMITED. The coding below goes through the column and replaces the =@SIPP LIMITED with AT SIPP LIMITED.
Two of us have tried the coding on two different machines and the VBA Code works as stated. However, on one persons machine they...
Hi All
I am hoping someone can help
I'm trying to group a pivot table by year & month in my workbook, but getting the following error: 'Runtime error 1004 - Group method of range class failed'
I tried to follow the same principle as this MrExcel video, as I don't want to have to select or...
Hi,
I have below macro that calculate StDev and it was working perfectly fine but I got error "unable to get the StDev property of the worksheetfunction class" whenever the I have empty cells. How can I fix this and make it ignore the empty cells and move on with other cells that have data...
I have a fairly simple macro built that is supposed to delete row 2, bold format font in row 1, auto fit column widths, and sort by column. The number of rows in the worksheet will vary, but the number of columns are the same every time. I've done a lot of searching in forums for the 1004 error...
Hi all
Updating someone else's VBA (no longer at company so cannot ask them!) and I keep getting this error, it is one of the very last stages of a long macro that autopopulates a number of emails. I gather the error is likely due to an undefined path/file name but I have not worked much with...
Hi all
Updating someone else's VBA (no longer at company so cannot ask them!) and I keep getting this error, it is one of the very last stages of a long macro that autopopulates a number of emails. I gather the error is likely due to an undefined path/file name but I have not worked much with...
I have tried a number of different variations to copy and paste but they are not working.
I keep experiencing a run time error.
Sub Filter()
Dim Wkb As Excel.Workbook
Dim ws As Sheets
Dim i As Long
Dim LastRow As Long
Dim LastRow1 As Long
Dim Rng As Range
Dim deleteRange As Range
Set...
Run-time error '1004': while trying to print
I have created a user form were I select certain checkboxes for the sheets I want to print and then run the code below to print.
If possible could someone take a look and see what I need to correct to fix this problem? Thanks for the help as always...
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...
Whenever I push "Save Donation" I an getting a Run-Time error '1004': Application-defined or object-defined error. I have looked over the code as well as go one by one through the text boxes to see if there was a mismatch in spelling or location. It references the sheet I am asking it to prior...
Hi, I'm having trouble with this error that appears whenever I try to run macros.
Sub Filter()
Sheets("Combination").Select
Range("A4:AJ598").AutoFilter
ActiveSheet.Range("$A$4:$AJ$598").AutoFilter Field:=1, Criteria1:="Y"
ActiveSheet.AutoFilter.Range.Copy...
I'm scanning ID & Username into "column A1" the vba then moves the cursor to the right to "column b" finally down to
"A2,B2,etc.... But if I make an error of some sort and click on the cell to delete the ID or Username this Run-time error
'1004': Application-defined or object-defined error...
Hello everyone, I am attempting to use the macro below, but for some reason the last section of the code (specific line item bolded and underlined) results in an error.
"Run-time error 1004: method range of object worksheet failed"
Any thoughts on why this is happening and how I can fix this...
One user (of many) receives the run-time error '1004': Paste method of Worksheet class failed
on the line "ActiveSheet.Paste" (see below for example macro)
I have many users here at work that use a whole slew of these types of macros as tickmarks in their Excel workpapers. They work for...
Why it can't read my path code? I want it to copy all my workbooks in that folder.
Path1 = "C:\Users\user\Desktop\DailyRecord"
Filename = Dir(Path1 & "&.csv")
Do While Filename <> " "
Workbooks.Open Filename:=Path1 & Filename, ReadOnly:=True
Hi All
I hope you can help. I am getting the error Run Time Error 1004 AutoFilter method of Range class Failed
When I run my code, the funny thing is It works perfectly by itself, but when I put it into the other code and call it, it gives the error Run Time Error 1004 AutoFilter method of...
Hi Guys,
I am using the below to save sheets as workbooks but it gives me a run time error 1004 saying this file cant be saved using the extension I have requested but my understanding is that .xlsm is the correct extension
Sub Export_Sheet_To_Order_File()
Dim wb As Workbook
Dim myPath As...
Hi - I have a code (shown below) that is creating multiple copies of a template worksheet and number sequentially. The problem is that I would like to have the template worksheets hidden, but when I do this I get a Run Time Error 1004: Method Select of Object_Worksheet failed. If not hidden, it...
All,
I am trying to create a macro that will work with a button to display either answers to a problem if the test has been completed or "Please finish the test before answers will be displayed".
Here is my current code
Sub Button_1()
Dim Answers As Range
Set Answers =...
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.