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.
 

Some videos you may like

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
47,513
Office Version
  1. 365
Platform
  1. Windows
jmersing

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

Watch MrExcel Video

Forum statistics

Threads
1,119,065
Messages
5,575,923
Members
412,689
Latest member
nhsmedic
Top