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

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
54,966
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.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,167,835
Messages
5,855,909
Members
431,772
Latest member
dannyboi1

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
Top