errors every time

jmersing

Well-known Member
Joined
Apr 14, 2004
Messages
887
I must be missing something, everytime I try to run this code it errors out, usually where I call the payroll Sub.

Maybe I've been looking at it too long.

All it does is copies a formula on the Tasks tab, clears out a range on the Payroll tab, copies a formula and clears a range on the Temp Tasks tab.

the code
Sub CLEAR_ALL_Payroll_Task()

On Error Resume Next

Application.Calculation = xlCalculationManual
Range("E11").Select
For Each Cell In Range("E11:E1500")
ActiveCell.FormulaR1C1 = "=CONCATENATE(""T"",RC[1])"
Next
Calculate
Range("E11:E1500").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

payroll
temptasks

MsgBox "Tasks Cleared", vbOKOnly, "Operation Complete"
End
End Sub

Sub payroll()
On Error Resume Next
Sheets("PAYROLL").Select
Application.ScreenUpdating = False
Range("A75").Select
Range("A75:EU1080").Select
Selection.ClearContents
End Sub

Sub temptasks()
On Error Resume Next

Sheets("TEMP TASKS").Select


Range("E11").Select
For Each Cell In Range("E11:E1500")
Cell.FormulaR1C1 = "=CONCATENATE(""T"",RC[1])"
Next
Calculate
Range("E11:E1500").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("F11:T1300").Select
Selection.ClearContents
Range("E11").Select
Sheets("TASKS").Select
Range("F11:T1300").Select
Selection.ClearContents
Range("E11").Select
ActiveWorkbook.PrecisionAsDisplayed = False

End Sub


Any help would be appreciated.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
jmersing

I think that you are unlikely to get a useful response unless you post your existing code and describe exactly what error occurs.
 
Upvote 0

Forum statistics

Threads
1,215,025
Messages
6,122,732
Members
449,093
Latest member
Mnur

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