Sub TS_New_Week()
Dim Answer_nw As String
Dim MyNote_nw As String
'Message goes here
MyNote_nw = "Are you sure that all the information in the current week is correct?"
'Display MessageBox
Answer_nw = MsgBox(MyNote_nw, vbQuestion + vbYesNo, "New Week Confirmation")
If Answer_nw = vbNo Then
'Code for No button Press
Close
Else
'Code for Yes button Press
Application.ScreenUpdating = False
'OPENS DTP PAGE
'This moves the "This weeks P/D Owed" over to "P/D Earned TEMP".
Sheet5.Select
Range("F4:F15").Select
Selection.Copy
Range("L4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'This moves "Total Hrs & Total OT Hrs" over to "Temp Hrs & Temp OT Hrs".
Range("D4:E15").Select
Selection.Copy
Range("J4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'This copies "Total (job) Hrs" over to "Temp (job) Hrs".
Range("E19:E206").Select
Application.CutCopyMode = False
Selection.Copy
Range("J19").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
' USES B. MILIC'S PAGE AS REFERENCE
'Selects start and stop times along with job hours and clears them
Sheet2.Select
Range("C8:I10,C14:I41").Select
Application.CutCopyMode = False
Selection.ClearContents
'INSERT/REINSERTS ORIGINAL COLORS
'Selects all even rows and paints them a light blue
Range( _
"A14:J14,A16:J16,A18:J18,A20:J20,A22:J22,A24:J24,A26:J26,A28:J28,A30:J30,A32:J32,A34:J35,A36:J37,A38:J38,A40:J40" _
).Select
With Selection.Interior
.Pattern = xlSolid
.PatternThemeColor = xlThemeColorAccent5
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.599993896298105
.PatternTintAndShade = 0.599993896298105
End With
'selects all Odd Rows and paints them a lighter blue
Range( _
"A15:J15,A17:J17,A19:J19,A21:J21,A23:J23,A25:J25,A27:J27,A29:J29,A31:J31,A33:J33,A35:J35,A37:J37,A39:J39" _
).Select
With Selection.Interior
.Pattern = xlSolid
.PatternThemeColor = xlThemeColorAccent5
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.799981688894314
.PatternTintAndShade = 0.799981688894314
End With
' SHEET3
'Selects start and stop times along with job hours and clears them
Sheet3.Select
Range("C8:I10,C14:I41").Select
Application.CutCopyMode = False
Selection.ClearContents
'INSERT/REINSERTS ORIGINAL COLORS
'Selects all even rows and paints them a light blue
Range( _
"A14:J14,A16:J16,A18:J18,A20:J20,A22:J22,A24:J24,A26:J26,A28:J28,A30:J30,A32:J32,A34:J35,A36:J37,A38:J38,A40:J40" _
).Select
With Selection.Interior
.Pattern = xlSolid
.PatternThemeColor = xlThemeColorAccent5
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.599993896298105
.PatternTintAndShade = 0.599993896298105
End With
'selects all Odd Rows and paints them a lighter blue
Range( _
"A15:J15,A17:J17,A19:J19,A21:J21,A23:J23,A25:J25,A27:J27,A29:J29,A31:J31,A33:J33,A35:J35,A37:J37,A39:J39" _
).Select
With Selection.Interior
.Pattern = xlSolid
.PatternThemeColor = xlThemeColorAccent5
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.799981688894314
.PatternTintAndShade = 0.799981688894314
End With
' SHEET11
'Selects start and stop times along with job hours and clears them
Sheet11.Select
Range("C8:I10,C14:I41").Select
Application.CutCopyMode = False
Selection.ClearContents
'INSERT/REINSERTS ORIGINAL COLORS
'Selects all even rows and paints them a light blue
Range( _
"A14:J14,A16:J16,A18:J18,A20:J20,A22:J22,A24:J24,A26:J26,A28:J28,A30:J30,A32:J32,A34:J35,A36:J37,A38:J38,A40:J40" _
).Select
With Selection.Interior
.Pattern = xlSolid
.PatternThemeColor = xlThemeColorAccent5
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.599993896298105
.PatternTintAndShade = 0.599993896298105
End With
'selects all Odd Rows and paints them a lighter blue
Range( _
"A15:J15,A17:J17,A19:J19,A21:J21,A23:J23,A25:J25,A27:J27,A29:J29,A31:J31,A33:J33,A35:J35,A37:J37,A39:J39" _
).Select
With Selection.Interior
.Pattern = xlSolid
.PatternThemeColor = xlThemeColorAccent5
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.799981688894314
.PatternTintAndShade = 0.799981688894314
End With
' SHEET12
'Selects start and stop times along with job hours and clears them
Sheet12.Select
Range("C8:I10,C14:I41").Select
Application.CutCopyMode = False
Selection.ClearContents
'INSERT/REINSERTS ORIGINAL COLORS
'Selects all even rows and paints them a light blue
Range( _
"A14:J14,A16:J16,A18:J18,A20:J20,A22:J22,A24:J24,A26:J26,A28:J28,A30:J30,A32:J32,A34:J35,A36:J37,A38:J38,A40:J40" _
).Select
With Selection.Interior
.Pattern = xlSolid
.PatternThemeColor = xlThemeColorAccent5
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.599993896298105
.PatternTintAndShade = 0.599993896298105
End With
'selects all Odd Rows and paints them a lighter blue
Range( _
"A15:J15,A17:J17,A19:J19,A21:J21,A23:J23,A25:J25,A27:J27,A29:J29,A31:J31,A33:J33,A35:J35,A37:J37,A39:J39" _
).Select
With Selection.Interior
.Pattern = xlSolid
.PatternThemeColor = xlThemeColorAccent5
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.799981688894314
.PatternTintAndShade = 0.799981688894314
End With
' SHEET14
'Selects start and stop times along with job hours and clears them
Sheet14.Select
Range("C8:I10,C14:I41").Select
Application.CutCopyMode = False
Selection.ClearContents
'INSERT/REINSERTS ORIGINAL COLORS
'Selects all even rows and paints them a light blue
Range( _
"A14:J14,A16:J16,A18:J18,A20:J20,A22:J22,A24:J24,A26:J26,A28:J28,A30:J30,A32:J32,A34:J35,A36:J37,A38:J38,A40:J40" _
).Select
With Selection.Interior
.Pattern = xlSolid
.PatternThemeColor = xlThemeColorAccent5
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.599993896298105
.PatternTintAndShade = 0.599993896298105
End With
'selects all Odd Rows and paints them a lighter blue
Range( _
"A15:J15,A17:J17,A19:J19,A21:J21,A23:J23,A25:J25,A27:J27,A29:J29,A31:J31,A33:J33,A35:J35,A37:J37,A39:J39" _
).Select
With Selection.Interior
.Pattern = xlSolid
.PatternThemeColor = xlThemeColorAccent5
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.799981688894314
.PatternTintAndShade = 0.799981688894314
End With
' SHEET15
'Selects start and stop times along with job hours and clears them
Sheet15.Select
Range("C8:I10,C14:I41").Select
Application.CutCopyMode = False
Selection.ClearContents
'INSERT/REINSERTS ORIGINAL COLORS
'Selects all even rows and paints them a light blue
Range( _
"A14:J14,A16:J16,A18:J18,A20:J20,A22:J22,A24:J24,A26:J26,A28:J28,A30:J30,A32:J32,A34:J35,A36:J37,A38:J38,A40:J40" _
).Select
With Selection.Interior
.Pattern = xlSolid
.PatternThemeColor = xlThemeColorAccent5
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.599993896298105
.PatternTintAndShade = 0.599993896298105
End With
'selects all Odd Rows and paints them a lighter blue
Range( _
"A15:J15,A17:J17,A19:J19,A21:J21,A23:J23,A25:J25,A27:J27,A29:J29,A31:J31,A33:J33,A35:J35,A37:J37,A39:J39" _
).Select
With Selection.Interior
.Pattern = xlSolid
.PatternThemeColor = xlThemeColorAccent5
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.799981688894314
.PatternTintAndShade = 0.799981688894314
End With
' SHEET16
'Selects start and stop times along with job hours and clears them
Sheet16.Select
Range("C8:I10,C14:I41").Select
Application.CutCopyMode = False
Selection.ClearContents
'INSERT/REINSERTS ORIGINAL COLORS
'Selects all even rows and paints them a light blue
Range( _
"A14:J14,A16:J16,A18:J18,A20:J20,A22:J22,A24:J24,A26:J26,A28:J28,A30:J30,A32:J32,A34:J35,A36:J37,A38:J38,A40:J40" _
).Select
With Selection.Interior
.Pattern = xlSolid
.PatternThemeColor = xlThemeColorAccent5
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.599993896298105
.PatternTintAndShade = 0.599993896298105
End With
'selects all Odd Rows and paints them a lighter blue
Range( _
"A15:J15,A17:J17,A19:J19,A21:J21,A23:J23,A25:J25,A27:J27,A29:J29,A31:J31,A33:J33,A35:J35,A37:J37,A39:J39" _
).Select
With Selection.Interior
.Pattern = xlSolid
.PatternThemeColor = xlThemeColorAccent5
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.799981688894314
.PatternTintAndShade = 0.799981688894314
End With
' SHEET17
'Selects start and stop times along with job hours and clears them
Sheet17.Select
Range("C8:I10,C14:I41").Select
Application.CutCopyMode = False
Selection.ClearContents
'INSERT/REINSERTS ORIGINAL COLORS
'Selects all even rows and paints them a light blue
Range( _
"A14:J14,A16:J16,A18:J18,A20:J20,A22:J22,A24:J24,A26:J26,A28:J28,A30:J30,A32:J32,A34:J35,A36:J37,A38:J38,A40:J40" _
).Select
With Selection.Interior
.Pattern = xlSolid
.PatternThemeColor = xlThemeColorAccent5
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.599993896298105
.PatternTintAndShade = 0.599993896298105
End With
'selects all Odd Rows and paints them a lighter blue
Range( _
"A15:J15,A17:J17,A19:J19,A21:J21,A23:J23,A25:J25,A27:J27,A29:J29,A31:J31,A33:J33,A35:J35,A37:J37,A39:J39" _
).Select
With Selection.Interior
.Pattern = xlSolid
.PatternThemeColor = xlThemeColorAccent5
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.799981688894314
.PatternTintAndShade = 0.799981688894314
End With
' SHEET18
'Selects start and stop times along with job hours and clears them
Sheet18.Select
Range("C8:I10,C14:I41").Select
Application.CutCopyMode = False
Selection.ClearContents
'INSERT/REINSERTS ORIGINAL COLORS
'Selects all even rows and paints them a light blue
Range( _
"A14:J14,A16:J16,A18:J18,A20:J20,A22:J22,A24:J24,A26:J26,A28:J28,A30:J30,A32:J32,A34:J35,A36:J37,A38:J38,A40:J40" _
).Select
With Selection.Interior
.Pattern = xlSolid
.PatternThemeColor = xlThemeColorAccent5
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.599993896298105
.PatternTintAndShade = 0.599993896298105
End With
'selects all Odd Rows and paints them a lighter blue
Range( _
"A15:J15,A17:J17,A19:J19,A21:J21,A23:J23,A25:J25,A27:J27,A29:J29,A31:J31,A33:J33,A35:J35,A37:J37,A39:J39" _
).Select
With Selection.Interior
.Pattern = xlSolid
.PatternThemeColor = xlThemeColorAccent5
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.799981688894314
.PatternTintAndShade = 0.799981688894314
End With
' SHEET19
'Selects start and stop times along with job hours and clears them
Sheet19.Select
Range("C8:I10,C14:I41").Select
Application.CutCopyMode = False
Selection.ClearContents
'INSERT/REINSERTS ORIGINAL COLORS
'Selects all even rows and paints them a light blue
Range( _
"A14:J14,A16:J16,A18:J18,A20:J20,A22:J22,A24:J24,A26:J26,A28:J28,A30:J30,A32:J32,A34:J35,A36:J37,A38:J38,A40:J40" _
).Select
With Selection.Interior
.Pattern = xlSolid
.PatternThemeColor = xlThemeColorAccent5
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.599993896298105
.PatternTintAndShade = 0.599993896298105
End With
'selects all Odd Rows and paints them a lighter blue
Range( _
"A15:J15,A17:J17,A19:J19,A21:J21,A23:J23,A25:J25,A27:J27,A29:J29,A31:J31,A33:J33,A35:J35,A37:J37,A39:J39" _
).Select
With Selection.Interior
.Pattern = xlSolid
.PatternThemeColor = xlThemeColorAccent5
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.799981688894314
.PatternTintAndShade = 0.799981688894314
End With
' SHEET20
'Selects start and stop times along with job hours and clears them
Sheet20.Select
Range("C8:I10,C14:I41").Select
Application.CutCopyMode = False
Selection.ClearContents
'INSERT/REINSERTS ORIGINAL COLORS
'Selects all even rows and paints them a light blue
Range( _
"A14:J14,A16:J16,A18:J18,A20:J20,A22:J22,A24:J24,A26:J26,A28:J28,A30:J30,A32:J32,A34:J35,A36:J37,A38:J38,A40:J40" _
).Select
With Selection.Interior
.Pattern = xlSolid
.PatternThemeColor = xlThemeColorAccent5
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.599993896298105
.PatternTintAndShade = 0.599993896298105
End With
'selects all Odd Rows and paints them a lighter blue
Range( _
"A15:J15,A17:J17,A19:J19,A21:J21,A23:J23,A25:J25,A27:J27,A29:J29,A31:J31,A33:J33,A35:J35,A37:J37,A39:J39" _
).Select
With Selection.Interior
.Pattern = xlSolid
.PatternThemeColor = xlThemeColorAccent5
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.799981688894314
.PatternTintAndShade = 0.799981688894314
End With
' SHEET21
'Selects start and stop times along with job hours and clears them
Sheet21.Select
Range("C8:I10,C14:I41").Select
Application.CutCopyMode = False
Selection.ClearContents
'INSERT/REINSERTS ORIGINAL COLORS
'Selects all even rows and paints them a light blue
Range( _
"A14:J14,A16:J16,A18:J18,A20:J20,A22:J22,A24:J24,A26:J26,A28:J28,A30:J30,A32:J32,A34:J35,A36:J37,A38:J38,A40:J40" _
).Select
With Selection.Interior
.Pattern = xlSolid
.PatternThemeColor = xlThemeColorAccent5
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.599993896298105
.PatternTintAndShade = 0.599993896298105
End With
'selects all Odd Rows and paints them a lighter blue
Range( _
"A15:J15,A17:J17,A19:J19,A21:J21,A23:J23,A25:J25,A27:J27,A29:J29,A31:J31,A33:J33,A35:J35,A37:J37,A39:J39" _
).Select
With Selection.Interior
.Pattern = xlSolid
.PatternThemeColor = xlThemeColorAccent5
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.799981688894314
.PatternTintAndShade = 0.799981688894314
End With
'Selects the date and moves it over to the next week.
Sheet1.Select
Range("E5").Select
Selection.Copy
Range("E4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Application.Dialogs(xlDialogSaveAs).Show
End If
End Sub