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

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
46,837
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,113,993
Messages
5,545,377
Members
410,679
Latest member
rolandbianco
Top