Password Protection for a MACRO

Northern NY Design

New Member
Joined
Sep 24, 2024
Messages
25
Office Version
  1. 365
Platform
  1. Windows
I am trying to make my MACRO (s) so that when someone clicks it they are prompted to enter "YES". I have read numerous threads on this but I cannot seem to make it work.

Below is the code for my MACRO, please show me where, and what to enter. Thank you in advance.

Sub CLEARROW18()
'
' CLEARROW18 Macro
' Use this MACRO to remove a driver from ROW 18 of the CURRENT DRIVER DATA without removing formulas or harming this spreadsheet set.
'
Sheets("CURRENT DRIVER DATA").Select
ActiveSheet.Unprotect
Range("A20:C20").Select
Selection.ClearContents
Range("E20").Select
Selection.ClearContents
Range("G20:AC20").Select
Selection.ClearContents
Range("AE20:AF20").Select
Selection.ClearContents
Range("AG20:AN20").Select
Selection.ClearContents
Range("AS20:AZ20").Select
Selection.ClearContents
Range("BE20:BL20").Select
Selection.ClearContents
Range("BQ20:BX20").Select
Selection.ClearContents
Range("CC20:CJ20").Select
Selection.ClearContents
Range("CO20:CV20").Select
Selection.ClearContents
Range("DA20:DH20").Select
Selection.ClearContents
Range("DM20:DT20").Select
Selection.ClearContents
Range("DY20:EF20").Select
Selection.ClearContents
Range("EK20:ER20").Select
Selection.ClearContents
Range("EW20:FD20").Select
Selection.ClearContents
Range("FI20:FP20").Select
Selection.ClearContents
Range("C20").Select
Sheets("CURRENT DRIVER DATA").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

End Sub
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Welcome to the Board!

I am not sure if you are saying that "YES" is your password, or you just want to prompt for yes before continuing.
Also, it is not necessary to actually select ranges in order to work with them. As matter as fact, doing so slows your code down.

See if this does what you want:
VBA Code:
Sub CLEARROW18()
'
' CLEARROW18 Macro
' Use this MACRO to remove a driver from ROW 18 of the CURRENT DRIVER DATA without removing formulas or harming this spreadsheet set.
'

    Dim chk
    chk = InputBox("Please enter prompt")

    If UCase(chk) = "YES" Then
        Sheets("CURRENT DRIVER DATA").Select
        ActiveSheet.Unprotect
        Range("A20:C20").ClearContents
        Range("E20").ClearContents
        Range("G20:AC20").ClearContents
        Range("AE20:AF20").ClearContents
        Range("AG20:AN20").ClearContents
        Range("AS20:AZ20").ClearContents
        Range("BE20:BL20").ClearContents
        Range("BQ20:BX20").ClearContents
        Range("CC20:CJ20").ClearContents
        Range("CO20:CV20").ClearContents
        Range("DA20:DH20").ClearContents
        Range("DM20:DT20").ClearContents
        Range("DY20:EF20").ClearContents
        Range("EK20:ER20").ClearContents
        Range("EW20:FD20").ClearContents
        Range("FI20:FP20").ClearContents
        Range("C20").Select
        ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Else
        MsgBox "You have not entered the correct value", vbOKOnly, "ERROR!"
    End If
    
End Sub
 
Upvote 0
Solution
Welcome to the Board!

I am not sure if you are saying that "YES" is your password, or you just want to prompt for yes before continuing.
Also, it is not necessary to actually select ranges in order to work with them. As matter as fact, doing so slows your code down.

See if this does what you want:
VBA Code:
Sub CLEARROW18()
'
' CLEARROW18 Macro
' Use this MACRO to remove a driver from ROW 18 of the CURRENT DRIVER DATA without removing formulas or harming this spreadsheet set.
'

    Dim chk
    chk = InputBox("Please enter prompt")

    If UCase(chk) = "YES" Then
        Sheets("CURRENT DRIVER DATA").Select
        ActiveSheet.Unprotect
        Range("A20:C20").ClearContents
        Range("E20").ClearContents
        Range("G20:AC20").ClearContents
        Range("AE20:AF20").ClearContents
        Range("AG20:AN20").ClearContents
        Range("AS20:AZ20").ClearContents
        Range("BE20:BL20").ClearContents
        Range("BQ20:BX20").ClearContents
        Range("CC20:CJ20").ClearContents
        Range("CO20:CV20").ClearContents
        Range("DA20:DH20").ClearContents
        Range("DM20:DT20").ClearContents
        Range("DY20:EF20").ClearContents
        Range("EK20:ER20").ClearContents
        Range("EW20:FD20").ClearContents
        Range("FI20:FP20").ClearContents
        Range("C20").Select
        ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Else
        MsgBox "You have not entered the correct value", vbOKOnly, "ERROR!"
    End If
   
End Sub
AWESOME, thank you so much. This works PERFECTLY!
 
Upvote 0
You are welcome.
Glad I was able to help!
 
Upvote 0
I am having problems with this macro. If I enter the information above to make it ask for the work YES to be entered, it creates an error. Can you tell me what I am doing wrong? This is the WORKING code without the prompt asking if you want to do this, "type YES".

Sub SORTCURRENTDRIVERDATA()
'
' SORTCURRENTDRIVERDATA Macro
'
' Keyboard Shortcut: Ctrl+Shift+S
'
Range("A3").Select
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 36
ActiveWindow.ScrollColumn = 45
ActiveWindow.ScrollColumn = 61
ActiveWindow.ScrollColumn = 75
ActiveWindow.ScrollColumn = 84
ActiveWindow.ScrollColumn = 87
ActiveWindow.ScrollColumn = 90
ActiveWindow.ScrollColumn = 95
ActiveWindow.ScrollColumn = 98
ActiveWindow.ScrollColumn = 106
ActiveWindow.ScrollColumn = 111
ActiveWindow.ScrollColumn = 117
ActiveWindow.ScrollColumn = 121
ActiveWindow.ScrollColumn = 124
ActiveWindow.ScrollColumn = 130
ActiveWindow.ScrollColumn = 132
ActiveWindow.ScrollColumn = 135
ActiveWindow.ScrollColumn = 139
ActiveWindow.ScrollColumn = 144
ActiveWindow.ScrollColumn = 150
ActiveWindow.ScrollColumn = 154
ActiveWindow.ScrollColumn = 158
ActiveWindow.ScrollColumn = 160
ActiveWindow.ScrollColumn = 162
ActiveWindow.ScrollColumn = 166
ActiveWindow.ScrollRow = 4
ActiveWindow.ScrollRow = 8
ActiveWindow.ScrollRow = 14
ActiveWindow.ScrollRow = 20
ActiveWindow.ScrollRow = 29
ActiveWindow.ScrollRow = 37
ActiveWindow.ScrollRow = 52
ActiveWindow.ScrollRow = 54
ActiveWindow.ScrollRow = 56
ActiveWindow.ScrollRow = 58
ActiveWindow.ScrollRow = 68
ActiveWindow.ScrollRow = 69
Range("A3:FX102").Select
ActiveWorkbook.Worksheets("CURRENT DRIVER DATA").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("CURRENT DRIVER DATA").Sort.SortFields.Add2 Key:= _
Range("B3:B102"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption _
:=xlSortNormal
With ActiveWorkbook.Worksheets("CURRENT DRIVER DATA").Sort
.SetRange Range("A3:FX102")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("C3").Select
End Sub
 
Upvote 0
AWESOME, thank you so much. This works PERFECTLY!
I am having the same issue with my RESET Macro, can you show me why this will not work?

VBA Code:
Sub RESETTRACKER()
'
' RESETTRACKER Macro
' This MACRO will reset the ENTIRE Tracker for a new week, making a copy of the CURRENT WEEK for archive.
'
Dim chk
chk = InputBox("Please enter prompt")
If UCase(chk) = "YES" Then
Sheets("CURRENT WEEK").Select
ActiveSheet.Unprotect
Sheets("SUN").Select
 ActiveSheet.Unprotect
Sheets("MON").Select
ActiveSheet.Unprotect
Sheets("TUE").Select
ActiveSheet.Unprotect
Sheets("WED").Select
ActiveSheet.Unprotect
Sheets("THU").Select
ActiveSheet.Unprotect
Sheets("FRI").Select
ActiveSheet.Unprotect
Sheets("SAT").Select
ActiveSheet.Unprotect
Sheets("NEXT MON").Select
ActiveSheet.Unprotect
Sheets("CURRENT WEEK").Select
ActiveSheet.Buttons.Add(328.5, 10.5, 200.5, 24.5).Select
Sheets("CURRENT WEEK").Copy Before:=Sheets(19)
Sheets("CURRENT WEEK (2)").Select
Sheets("CURRENT WEEK (2)").Name = "LAST WEEK"
Cells.Select
Selection.Locked = True
Selection.FormulaHidden = False
Selection.Copy
Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A1:J3").Select
Sheets("LAST WEEK").Select
Application.CutCopyMode = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Sheets("CURRENT WEEK").Select
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 27
ActiveWindow.ScrollColumn = 35
ActiveWindow.ScrollColumn = 50
ActiveWindow.ScrollColumn = 56
ActiveWindow.ScrollColumn = 76
ActiveWindow.ScrollColumn = 78
ActiveWindow.ScrollColumn = 80
ActiveWindow.ScrollColumn = 84
ActiveWindow.ScrollColumn = 91
ActiveWindow.ScrollColumn = 92
ActiveWindow.ScrollColumn = 93
ActiveWindow.ScrollColumn = 94
ActiveWindow.ScrollColumn = 95
ActiveWindow.ScrollColumn = 96
ActiveWindow.ScrollColumn = 97
ActiveWindow.ScrollColumn = 101
ActiveWindow.ScrollColumn = 102
ActiveWindow.ScrollColumn = 103
ActiveWindow.ScrollColumn = 104
ActiveWindow.ScrollColumn = 105
ActiveWindow.ScrollColumn = 107
ActiveWindow.ScrollColumn = 109
ActiveWindow.ScrollColumn = 111
ActiveWindow.ScrollColumn = 113
ActiveWindow.ScrollColumn = 115
ActiveWindow.ScrollColumn = 116
ActiveWindow.ScrollColumn = 117
ActiveWindow.ScrollColumn = 118
ActiveWindow.ScrollColumn = 119
ActiveWindow.ScrollColumn = 121
ActiveWindow.ScrollColumn = 123
ActiveWindow.ScrollColumn = 124
ActiveWindow.ScrollColumn = 126
ActiveWindow.ScrollColumn = 127
ActiveWindow.ScrollColumn = 128
ActiveWindow.ScrollColumn = 130
ActiveWindow.ScrollColumn = 132
ActiveWindow.ScrollColumn = 133
ActiveWindow.ScrollColumn = 134
ActiveWindow.ScrollColumn = 135
Rows("35:106").Select
Selection.EntireRow.Hidden = True
ActiveWindow.SmallScroll Down:=2
Rows("34:107").Select
Selection.EntireRow.Hidden = False
ActiveWindow.SmallScroll Down:=-2
Range("EJ6:ES7").Select
ActiveWindow.ScrollRow = 7
ActiveWindow.ScrollRow = 14
ActiveWindow.ScrollRow = 22
ActiveWindow.ScrollRow = 26
ActiveWindow.ScrollRow = 37
ActiveWindow.ScrollRow = 41
ActiveWindow.ScrollRow = 45
ActiveWindow.ScrollRow = 53
ActiveWindow.ScrollRow = 57
ActiveWindow.ScrollRow = 60
ActiveWindow.ScrollRow = 67
ActiveWindow.ScrollRow = 70
ActiveWindow.ScrollRow = 73
ActiveWindow.ScrollRow = 81
ActiveWindow.ScrollRow = 84
ActiveWindow.ScrollRow = 87
ActiveWindow.ScrollRow = 89
ActiveWindow.ScrollRow = 91
ActiveWindow.ScrollRow = 93
ActiveWindow.ScrollRow = 94
ActiveWindow.ScrollRow = 95
ActiveWindow.ScrollRow = 94
ActiveWindow.ScrollRow = 92
ActiveWindow.ScrollRow = 91
Range("EJ6:ES105").Select
Selection.Copy
ActiveWindow.ScrollColumn = 126
ActiveWindow.ScrollColumn = 119
ActiveWindow.ScrollColumn = 109
ActiveWindow.ScrollColumn = 103
ActiveWindow.ScrollColumn = 92
ActiveWindow.ScrollColumn = 78
ActiveWindow.ScrollColumn = 74
ActiveWindow.ScrollColumn = 46
ActiveWindow.ScrollColumn = 43
ActiveWindow.ScrollColumn = 40
ActiveWindow.ScrollColumn = 39
ActiveWindow.ScrollColumn = 44
ActiveWindow.ScrollColumn = 46
ActiveWindow.ScrollColumn = 49
ActiveWindow.ScrollColumn = 51
ActiveWindow.ScrollColumn = 54
ActiveWindow.ScrollColumn = 55
ActiveWindow.ScrollColumn = 56
ActiveWindow.ScrollColumn = 57
ActiveWindow.ScrollColumn = 58
ActiveWindow.ScrollColumn = 59
ActiveWindow.ScrollColumn = 60
ActiveWindow.ScrollColumn = 61
ActiveWindow.ScrollColumn = 70
ActiveWindow.ScrollColumn = 71
ActiveWindow.ScrollColumn = 72
ActiveWindow.ScrollColumn = 73
ActiveWindow.ScrollColumn = 75
ActiveWindow.ScrollColumn = 78
ActiveWindow.ScrollColumn = 79
ActiveWindow.ScrollColumn = 80
ActiveWindow.ScrollColumn = 79
ActiveWindow.ScrollColumn = 78
ActiveWindow.ScrollColumn = 77
ActiveWindow.ScrollColumn = 76
ActiveWindow.SmallScroll Down:=-85
Range("CB6").Select
Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("CL6").Select
ActiveWindow.ScrollColumn = 77
ActiveWindow.ScrollColumn = 79
ActiveWindow.ScrollColumn = 80
ActiveWindow.ScrollColumn = 81
ActiveWindow.ScrollColumn = 83
ActiveWindow.ScrollColumn = 84
ActiveWindow.ScrollColumn = 86
ActiveWindow.ScrollColumn = 87
ActiveWindow.ScrollColumn = 89
ActiveWindow.ScrollColumn = 90
ActiveWindow.ScrollColumn = 91
ActiveWindow.ScrollColumn = 93
ActiveWindow.ScrollColumn = 95
ActiveWindow.ScrollColumn = 99
ActiveWindow.ScrollColumn = 100
ActiveWindow.ScrollColumn = 102
ActiveWindow.ScrollColumn = 103
ActiveWindow.ScrollColumn = 104
ActiveWindow.ScrollColumn = 108
ActiveWindow.ScrollColumn = 117
ActiveWindow.ScrollColumn = 122
ActiveWindow.ScrollColumn = 123
ActiveWindow.ScrollColumn = 124
ActiveWindow.ScrollColumn = 125
ActiveWindow.ScrollColumn = 132
ActiveWindow.ScrollColumn = 134
ActiveWindow.ScrollColumn = 135
ActiveWindow.ScrollRow = 8
ActiveWindow.ScrollRow = 10
ActiveWindow.ScrollRow = 15
ActiveWindow.ScrollRow = 20
ActiveWindow.ScrollRow = 23
ActiveWindow.ScrollRow = 28
ActiveWindow.ScrollRow = 31
ActiveWindow.ScrollRow = 46
ActiveWindow.ScrollRow = 49
ActiveWindow.ScrollRow = 54
ActiveWindow.ScrollRow = 63
ActiveWindow.ScrollRow = 65
ActiveWindow.ScrollRow = 68
ActiveWindow.ScrollRow = 73
ActiveWindow.ScrollRow = 81
ActiveWindow.ScrollRow = 84
ActiveWindow.ScrollRow = 88
ActiveWindow.ScrollRow = 89
ActiveWindow.ScrollRow = 93
ActiveWindow.ScrollRow = 96
ActiveWindow.ScrollRow = 98
ActiveWindow.ScrollRow = 99
ActiveWindow.ScrollRow = 100
ActiveWindow.ScrollRow = 99
ActiveWindow.ScrollRow = 97
ActiveWindow.ScrollRow = 96
Range("ES105").Select
ActiveWindow.ScrollRow = 95
ActiveWindow.ScrollRow = 93
ActiveWindow.ScrollRow = 91
ActiveWindow.ScrollRow = 87
ActiveWindow.ScrollRow = 83
ActiveWindow.ScrollRow = 81
ActiveWindow.ScrollRow = 72
ActiveWindow.ScrollRow = 67
ActiveWindow.ScrollRow = 60
ActiveWindow.ScrollRow = 55
ActiveWindow.ScrollRow = 47
ActiveWindow.ScrollRow = 46
ActiveWindow.ScrollRow = 42
ActiveWindow.ScrollRow = 38
ActiveWindow.ScrollRow = 31
ActiveWindow.ScrollRow = 29
ActiveWindow.ScrollRow = 26
ActiveWindow.ScrollRow = 23
ActiveWindow.ScrollRow = 19
ActiveWindow.ScrollRow = 7
ActiveWindow.ScrollRow = 6
ActiveWindow.ScrollColumn = 134
ActiveWindow.ScrollColumn = 133
ActiveWindow.ScrollColumn = 132
ActiveWindow.ScrollColumn = 131
ActiveWindow.ScrollColumn = 129
ActiveWindow.ScrollColumn = 127
ActiveWindow.ScrollColumn = 125
ActiveWindow.ScrollColumn = 124
ActiveWindow.ScrollColumn = 123
ActiveWindow.ScrollColumn = 122
ActiveWindow.ScrollColumn = 119
ActiveWindow.ScrollColumn = 115
ActiveWindow.ScrollColumn = 114
ActiveWindow.ScrollColumn = 106
ActiveWindow.ScrollColumn = 104
ActiveWindow.ScrollColumn = 103
ActiveWindow.ScrollColumn = 95
ActiveWindow.ScrollColumn = 93
ActiveWindow.ScrollColumn = 90
ActiveWindow.ScrollColumn = 89
ActiveWindow.ScrollColumn = 88
ActiveWindow.ScrollColumn = 87
ActiveWindow.ScrollColumn = 86
ActiveWindow.ScrollColumn = 85
ActiveWindow.ScrollColumn = 84
ActiveWindow.ScrollColumn = 83
ActiveWindow.ScrollColumn = 82
ActiveWindow.ScrollColumn = 81
ActiveWindow.ScrollColumn = 80
Range("CL6:ES105").Select
Range("ES105").Activate
Application.CutCopyMode = False
Selection.ClearContents
ActiveWindow.SmallScroll Down:=0
Range("S6:T6").Select
Sheets("CURRENT WEEK").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Sheets("SUN").Select
ActiveWindow.SmallScroll Down:=8
Rows("34:105").Select
Selection.EntireRow.Hidden = False
ActiveWindow.SmallScroll Down:=-8
Range("O5:Q5").Select
ActiveWindow.ScrollRow = 7
ActiveWindow.ScrollRow = 9
ActiveWindow.ScrollRow = 11
ActiveWindow.ScrollRow = 14
ActiveWindow.ScrollRow = 16
ActiveWindow.ScrollRow = 18
ActiveWindow.ScrollRow = 25
ActiveWindow.ScrollRow = 27
ActiveWindow.ScrollRow = 30
ActiveWindow.ScrollRow = 34
ActiveWindow.ScrollRow = 39
ActiveWindow.ScrollRow = 40
ActiveWindow.ScrollRow = 41
ActiveWindow.ScrollRow = 42
ActiveWindow.ScrollRow = 44
ActiveWindow.ScrollRow = 47
ActiveWindow.ScrollRow = 49
ActiveWindow.ScrollRow = 50
ActiveWindow.ScrollRow = 52
ActiveWindow.ScrollRow = 53
ActiveWindow.ScrollRow = 55
ActiveWindow.ScrollRow = 59
ActiveWindow.ScrollRow = 60
ActiveWindow.ScrollRow = 61
ActiveWindow.ScrollRow = 62
ActiveWindow.ScrollRow = 63
ActiveWindow.ScrollRow = 64
ActiveWindow.ScrollRow = 65
ActiveWindow.ScrollRow = 66
ActiveWindow.ScrollRow = 67
ActiveWindow.ScrollRow = 68
ActiveWindow.ScrollRow = 69
ActiveWindow.ScrollRow = 70
ActiveWindow.ScrollRow = 71
ActiveWindow.ScrollRow = 72
ActiveWindow.ScrollRow = 73
Range("O5:Q104").Select
Selection.ClearContents
Range("S5:U5").Select
ActiveWindow.ScrollRow = 6
ActiveWindow.ScrollRow = 10
ActiveWindow.ScrollRow = 13
ActiveWindow.ScrollRow = 16
ActiveWindow.ScrollRow = 19
ActiveWindow.ScrollRow = 25
ActiveWindow.ScrollRow = 27
ActiveWindow.ScrollRow = 29
ActiveWindow.ScrollRow = 32
ActiveWindow.ScrollRow = 37
ActiveWindow.ScrollRow = 40
ActiveWindow.ScrollRow = 45
ActiveWindow.ScrollRow = 54
ActiveWindow.ScrollRow = 55
ActiveWindow.ScrollRow = 57
ActiveWindow.ScrollRow = 62
ActiveWindow.ScrollRow = 63
ActiveWindow.ScrollRow = 64
ActiveWindow.ScrollRow = 65
ActiveWindow.ScrollRow = 68
ActiveWindow.ScrollRow = 69
ActiveWindow.ScrollRow = 72
ActiveWindow.ScrollRow = 73
Range("S5:U104").Select
Selection.ClearContents
Selection.ClearContents
Range("W5:Y5").Select
ActiveWindow.ScrollRow = 7
ActiveWindow.ScrollRow = 11
ActiveWindow.ScrollRow = 14
ActiveWindow.ScrollRow = 18
ActiveWindow.ScrollRow = 20
ActiveWindow.ScrollRow = 27
ActiveWindow.ScrollRow = 30
ActiveWindow.ScrollRow = 33
ActiveWindow.ScrollRow = 39
ActiveWindow.ScrollRow = 41
ActiveWindow.ScrollRow = 44
ActiveWindow.ScrollRow = 49
ActiveWindow.ScrollRow = 51
ActiveWindow.ScrollRow = 53
ActiveWindow.ScrollRow = 56
ActiveWindow.ScrollRow = 63
ActiveWindow.ScrollRow = 64
ActiveWindow.ScrollRow = 66
ActiveWindow.ScrollRow = 68
ActiveWindow.ScrollRow = 69
ActiveWindow.ScrollRow = 71
ActiveWindow.ScrollRow = 72
ActiveWindow.ScrollRow = 73
Range("W5:Y104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-68
ActiveWindow.ScrollColumn = 1
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 18
ActiveWindow.ScrollColumn = 19
ActiveWindow.ScrollColumn = 20
Range("AA5:AC5").Select
ActiveWindow.SmallScroll Down:=78
Range("AA5:AC104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-78
Range("AE5:AG5").Select
ActiveWindow.SmallScroll Down:=73
Range("AE5:AG104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-73
ActiveWindow.ScrollColumn = 1
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 19
ActiveWindow.ScrollColumn = 20
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 22
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 24
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 26
ActiveWindow.ScrollColumn = 27
ActiveWindow.ScrollColumn = 28
Range("AI5:AT5").Select
ActiveWindow.ScrollRow = 6
ActiveWindow.ScrollRow = 8
ActiveWindow.ScrollRow = 12
ActiveWindow.ScrollRow = 19
ActiveWindow.ScrollRow = 24
ActiveWindow.ScrollRow = 31
ActiveWindow.ScrollRow = 34
ActiveWindow.ScrollRow = 44
ActiveWindow.ScrollRow = 47
ActiveWindow.ScrollRow = 57
ActiveWindow.ScrollRow = 59
ActiveWindow.ScrollRow = 62
ActiveWindow.ScrollRow = 69
ActiveWindow.ScrollRow = 71
ActiveWindow.ScrollRow = 73
Range("AI5:AT104").Select
Selection.ClearContents
Range("I5:J5").Select
Sheets("SUN").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
ActiveWindow.ScrollWorkbookTabs Sheets:=1
Sheets("NEXT MON").Select
Range("O5:Q5").Select
ActiveWindow.SmallScroll Down:=8
Rows("34:105").Select
Selection.EntireRow.Hidden = False
ActiveWindow.SmallScroll Down:=-8
Range("O5:Q5").Select
ActiveWindow.ScrollRow = 6
ActiveWindow.ScrollRow = 9
ActiveWindow.ScrollRow = 12
ActiveWindow.ScrollRow = 14
ActiveWindow.ScrollRow = 17
ActiveWindow.ScrollRow = 18
ActiveWindow.ScrollRow = 21
ActiveWindow.ScrollRow = 28
ActiveWindow.ScrollRow = 30
ActiveWindow.ScrollRow = 33
ActiveWindow.ScrollRow = 38
ActiveWindow.ScrollRow = 41
ActiveWindow.ScrollRow = 44
ActiveWindow.ScrollRow = 45
ActiveWindow.ScrollRow = 50
ActiveWindow.ScrollRow = 51
ActiveWindow.ScrollRow = 52
ActiveWindow.ScrollRow = 54
ActiveWindow.ScrollRow = 57
ActiveWindow.ScrollRow = 58
ActiveWindow.ScrollRow = 61
ActiveWindow.ScrollRow = 63
ActiveWindow.ScrollRow = 66
ActiveWindow.ScrollRow = 68
ActiveWindow.ScrollRow = 70
ActiveWindow.ScrollRow = 73
Range("O5:Q104").Select
Selection.Copy
Sheets("MON").Select
Range("O5").Select
Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("NEXT MON").Select
ActiveWindow.SmallScroll Down:=-68
Range("S5:U5").Select
ActiveWindow.SmallScroll Down:=81
Range("S5:U104").Select
Application.CutCopyMode = False
Selection.Copy
ActiveWindow.SmallScroll Down:=-81
Sheets("MON").Select
Range("S5").Select
Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("NEXT MON").Select
Range("W5:Y5").Select
ActiveWindow.ScrollRow = 6
ActiveWindow.ScrollRow = 9
ActiveWindow.ScrollRow = 11
ActiveWindow.ScrollRow = 15
ActiveWindow.ScrollRow = 17
ActiveWindow.ScrollRow = 19
ActiveWindow.ScrollRow = 20
ActiveWindow.ScrollRow = 26
ActiveWindow.ScrollRow = 28
ActiveWindow.ScrollRow = 30
ActiveWindow.ScrollRow = 38
ActiveWindow.ScrollRow = 41
ActiveWindow.ScrollRow = 43
ActiveWindow.ScrollRow = 49
ActiveWindow.ScrollRow = 51
ActiveWindow.ScrollRow = 52
ActiveWindow.ScrollRow = 54
ActiveWindow.ScrollRow = 56
ActiveWindow.ScrollRow = 57
ActiveWindow.ScrollRow = 58
ActiveWindow.ScrollRow = 59
ActiveWindow.ScrollRow = 61
ActiveWindow.ScrollRow = 63
ActiveWindow.ScrollRow = 65
ActiveWindow.ScrollRow = 66
ActiveWindow.ScrollRow = 71
ActiveWindow.ScrollRow = 72
ActiveWindow.ScrollRow = 73
Range("W5:Y5,Y104").Select
Range("Y104").Activate
ActiveWindow.ScrollRow = 72
ActiveWindow.ScrollRow = 71
ActiveWindow.ScrollRow = 66
ActiveWindow.ScrollRow = 47
ActiveWindow.ScrollRow = 44
ActiveWindow.ScrollRow = 38
ActiveWindow.ScrollRow = 31
ActiveWindow.ScrollRow = 28
ActiveWindow.ScrollRow = 25
ActiveWindow.ScrollRow = 23
ActiveWindow.ScrollRow = 21
ActiveWindow.ScrollRow = 18
ActiveWindow.ScrollRow = 17
ActiveWindow.ScrollRow = 15
ActiveWindow.ScrollRow = 14
ActiveWindow.ScrollRow = 13
ActiveWindow.ScrollRow = 12
ActiveWindow.ScrollRow = 10
ActiveWindow.ScrollRow = 9
ActiveWindow.ScrollRow = 8
ActiveWindow.ScrollRow = 7
ActiveWindow.ScrollRow = 6
ActiveWindow.ScrollRow = 5
Range("W5:Y5,W5:Y104").Select
Range("Y104").Activate
Application.CutCopyMode = False
Range("W5:Y5").Select
ActiveWindow.SmallScroll Down:=70
Range("W5:Y104").Select
Selection.Copy
Sheets("MON").Select
Range("W5").Select
Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWindow.ScrollColumn = 1
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 18
ActiveWindow.ScrollColumn = 19
ActiveWindow.ScrollColumn = 20
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 22
Sheets("NEXT MON").Select
ActiveWindow.SmallScroll Down:=-70
ActiveWindow.ScrollColumn = 1
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 7
ActiveWindow.SmallScroll ToRight:=11
Range("AA5:AC5").Select
ActiveWindow.SmallScroll Down:=76
Range("AA5:AC104").Select
Application.CutCopyMode = False
Selection.Copy
ActiveWindow.SmallScroll Down:=-76
Sheets("MON").Select
Range("AA5").Select
Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("NEXT MON").Select
ActiveWindow.SmallScroll ToRight:=7
Range("AE5:AG5").Select
ActiveWindow.SmallScroll Down:=8
ActiveWindow.ScrollRow = 14
ActiveWindow.ScrollRow = 16
ActiveWindow.ScrollRow = 21
ActiveWindow.ScrollRow = 29
ActiveWindow.ScrollRow = 33
ActiveWindow.ScrollRow = 39
ActiveWindow.ScrollRow = 41
ActiveWindow.ScrollRow = 44
ActiveWindow.ScrollRow = 53
ActiveWindow.ScrollRow = 55
ActiveWindow.ScrollRow = 57
ActiveWindow.ScrollRow = 58
ActiveWindow.ScrollRow = 59
ActiveWindow.ScrollRow = 62
ActiveWindow.ScrollRow = 64
ActiveWindow.ScrollRow = 66
ActiveWindow.ScrollRow = 68
ActiveWindow.ScrollRow = 69
ActiveWindow.ScrollRow = 70
ActiveWindow.ScrollRow = 71
ActiveWindow.ScrollRow = 72
ActiveWindow.ScrollRow = 73
Range("AE5:AG104").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("MON").Select
Range("AE5").Select
Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("NEXT MON").Select
ActiveWindow.SmallScroll Down:=-68
Range("AI5:AT5").Select
ActiveWindow.SmallScroll Down:=78
Range("AI5:AT104").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("MON").Select
ActiveWindow.SmallScroll Down:=0
Range("AI5").Select
Sheets("NEXT MON").Select
ActiveWindow.SmallScroll Down:=-78
Range("AI5:AM5").Select
ActiveWindow.ScrollRow = 6
ActiveWindow.ScrollRow = 9
ActiveWindow.ScrollRow = 16
ActiveWindow.ScrollRow = 24
ActiveWindow.ScrollRow = 35
ActiveWindow.ScrollRow = 37
ActiveWindow.ScrollRow = 38
ActiveWindow.ScrollRow = 41
ActiveWindow.ScrollRow = 43
ActiveWindow.ScrollRow = 50
ActiveWindow.ScrollRow = 51
ActiveWindow.ScrollRow = 52
ActiveWindow.ScrollRow = 54
ActiveWindow.ScrollRow = 57
ActiveWindow.ScrollRow = 59
ActiveWindow.ScrollRow = 61
ActiveWindow.ScrollRow = 63
ActiveWindow.ScrollRow = 65
ActiveWindow.ScrollRow = 67
ActiveWindow.ScrollRow = 71
ActiveWindow.ScrollRow = 72
ActiveWindow.ScrollRow = 73
Range("AI5:AM104").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("MON").Select
Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWindow.SmallScroll ToRight:=12
Sheets("NEXT MON").Select
ActiveWindow.ScrollColumn = 1
ActiveWindow.ScrollColumn = 24
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 26
ActiveWindow.ScrollColumn = 27
ActiveWindow.SmallScroll ToRight:=6
ActiveWindow.SmallScroll Down:=-68
Range("AN5:AT5").Select
ActiveWindow.SmallScroll Down:=81
Range("AN5:AT104").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("MON").Select
Range("AN5:AT5").Select
Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("NEXT MON").Select
ActiveWindow.ScrollColumn = 1
ActiveWindow.SmallScroll Down:=-81
Range("C5:D5").Select
ActiveWindow.SmallScroll Down:=81
Range("C5:D104").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("MON").Select
ActiveWindow.SmallScroll Down:=0
Range("C5:D5").Select
Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWindow.SmallScroll Down:=2
Sheets("MON").Select
Application.CutCopyMode = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowSorting:=True
Sheets("NEXT MON").Select
ActiveWindow.SmallScroll Down:=-81
Selection.ClearContents
Range("O5:Q104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-67
Range("S5:U5").Select
ActiveWindow.SmallScroll Down:=81
Selection.ClearContents
Range("U104").Select
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-81
Range("S5:U104").Select
Range("U104").Activate
Selection.ClearContents
Range("W5:Y5").Select
ActiveWindow.SmallScroll Down:=84
Range("W5:Y104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-84
Range("AA5:AC5").Select
ActiveWindow.SmallScroll Down:=73
Range("AA5:AC104").Select
Selection.ClearContents
ActiveWindow.ScrollColumn = 1
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 18
ActiveWindow.ScrollColumn = 19
ActiveWindow.ScrollColumn = 20
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 22
ActiveWindow.SmallScroll Down:=-73
Range("AE5:AG5").Select
ActiveWindow.SmallScroll Down:=70
Range("AE5:AG104").Select
Selection.ClearContents
ActiveWindow.ScrollColumn = 1
ActiveWindow.ScrollColumn = 18
ActiveWindow.ScrollColumn = 19
ActiveWindow.ScrollColumn = 20
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 22
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 24
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 26
ActiveWindow.ScrollColumn = 27
ActiveWindow.ScrollColumn = 28
ActiveWindow.ScrollColumn = 29
ActiveWindow.SmallScroll Down:=-70
Range("AI5:AT5").Select
ActiveWindow.SmallScroll Down:=84
Range("AI5:AT104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-84
Range("I5:J5").Select
Sheets("NEXT MON").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Sheets("TUE").Select
Range("O5:Q5").Select
ActiveWindow.SmallScroll Down:=0
Rows("34:105").Select
Selection.EntireRow.Hidden = False
Range("O5:Q5").Select
ActiveWindow.SmallScroll Down:=81
Range("O5:Q104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-81
Range("S5:U5").Select
ActiveWindow.SmallScroll Down:=70
Range("S5:U104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-70
ActiveWindow.SmallScroll ToRight:=9
Range("W5:Y5").Select
ActiveWindow.SmallScroll Down:=78
Range("W5:Y104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-78
Range("AA5:AC5").Select
ActiveWindow.SmallScroll Down:=81
Range("AA5:AC104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-81
ActiveWindow.SmallScroll ToRight:=4
Range("AE5:AG5").Select
ActiveWindow.SmallScroll Down:=81
Range("AE5:AG104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-81
Range("AI5:AT5").Select
ActiveWindow.SmallScroll Down:=73
Range("AI5:AT104").Select
Selection.ClearContents
Range("C5:D104").Select
Selection.ClearContents
Range("A5:B5").Select
Sheets("TUE").Select
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False, AllowSorting:=True
Sheets("WED").Select
Rows("34:105").Select
Selection.EntireRow.Hidden = False
Range("C5:D5").Select
ActiveWindow.SmallScroll Down:=76
Range("C5:D104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-76
Range("O5:Q5").Select
ActiveWindow.SmallScroll Down:=73
Range("O5:Q104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-73
Range("S5:U5").Select
ActiveWindow.SmallScroll Down:=73
Range("S5:U104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-73
Range("W5:Y5").Select
ActiveWindow.SmallScroll Down:=67
Range("W5:Y104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-67
ActiveWindow.SmallScroll ToRight:=6
Range("AA5:AC5").Select
ActiveWindow.SmallScroll Down:=76
Range("AA5:AC104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-76
Range("AE5:AG5").Select
ActiveWindow.SmallScroll Down:=76
Range("AE5:AG104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-76
ActiveWindow.ScrollColumn = 1
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 18
ActiveWindow.ScrollColumn = 19
ActiveWindow.ScrollColumn = 20
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 22
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 24
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 26
ActiveWindow.ScrollColumn = 27
ActiveWindow.ScrollColumn = 28
ActiveWindow.ScrollColumn = 29
Range("AI5:AT5").Select
ActiveWindow.SmallScroll Down:=73
Range("AI5:AT104").Select
Selection.ClearContents
Range("I5:J5").Select
Sheets("WED").Select
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False, AllowSorting:=True
Sheets("THU").Select
Rows("34:105").Select
Selection.EntireRow.Hidden = False
Range("C5:D5").Select
ActiveWindow.SmallScroll Down:=78
Range("C5:D104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-78
Range("O5:Q5").Select
ActiveWindow.SmallScroll Down:=84
Range("O5:Q104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-84
Range("S5:U5").Select
ActiveWindow.SmallScroll Down:=84
Range("S5:U104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-84
Range("W5:Y5").Select
ActiveWindow.SmallScroll Down:=78
Range("W5:Y104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-78
ActiveWindow.SmallScroll ToRight:=8
Range("AA5:AC5").Select
ActiveWindow.SmallScroll Down:=84
Range("AA5:AC104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-84
Range("AE5:AG5").Select
ActiveWindow.SmallScroll Down:=70
Range("AE5:AG104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-70
ActiveWindow.SmallScroll ToRight:=9
Range("AI5:AT5").Select
ActiveWindow.SmallScroll Down:=76
Range("AI5:AT104").Select
Selection.ClearContents
Range("I5:J5").Select
Sheets("THU").Select
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False, AllowSorting:=True
Sheets("FRI").Select
Rows("34:105").Select
Selection.EntireRow.Hidden = False
Range("C5:D5").Select
ActiveWindow.SmallScroll Down:=76
Range("C5:D104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-76
Range("O5:Q5").Select
ActiveWindow.SmallScroll Down:=81
Range("O5:Q104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-81
Range("S5:U5").Select
ActiveWindow.SmallScroll Down:=78
Range("S5:U104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-78
Range("W5:Y5").Select
ActiveWindow.SmallScroll Down:=67
Range("W5:Y104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-67
ActiveWindow.SmallScroll ToRight:=14
Range("AA5:AC5").Select
ActiveWindow.SmallScroll Down:=76
Range("AA5:AC104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-76
Range("AE5:AG5").Select
ActiveWindow.SmallScroll Down:=76
Range("AE5:AG104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-76
Range("AI5:AT5").Select
ActiveWindow.SmallScroll Down:=70
Range("AI5:AT104").Select
Selection.ClearContents
Range("I5:J5").Select
Sheets("FRI").Select
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False, AllowSorting:=True
Sheets("SAT").Select
Rows("34:105").Select
Selection.EntireRow.Hidden = False
Range("C5:D5").Select
ActiveWindow.SmallScroll Down:=73
Range("C5:D104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-73
Range("O5:Q5").Select
ActiveWindow.SmallScroll Down:=70
Range("O5:Q104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-70
Range("S5:U5").Select
ActiveWindow.SmallScroll Down:=70
Range("S5:U104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-70
Range("W5:Y5").Select
ActiveWindow.SmallScroll Down:=73
Range("W5:Y104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-73
Range("AA5:AC5").Select
ActiveWindow.SmallScroll Down:=70
Range("AA5:AC104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-70
Range("AE5:AG5").Select
ActiveWindow.SmallScroll Down:=78
Range("AE5:AG104").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-78
Range("AI5:AT5").Select
ActiveWindow.SmallScroll Down:=76
Range("AI5:AT104").Select
Selection.ClearContents
Range("I5:J5").Select
Sheets("SAT").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Else
MsgBox "You have not entered the correct value", YES, "ERROR!"
End If

End Sub
 
Last edited by a moderator:
Upvote 0
Start by deleting all the rows of code containing ScrollColumn and ScrollRow. They aren't necessary. Also, try to follow the advice of @Joe4 as below.
Also, it is not necessary to actually select ranges in order to work with them. As matter as fact, doing so slows your code down.
Instead of using:
VBA Code:
chk = InputBox("Please enter prompt")
    If UCase(chk) = "YES" Then
Try this approach:
VBA Code:
Sub Test()
    If MsgBox("Do you want to proceed?", vbYesNo) = vbYes Then
        'your code here
    End If
End Sub
 
Upvote 0
Start by deleting all the rows of code containing ScrollColumn and ScrollRow. They aren't necessary. Also, try to follow the advice of @Joe4 as below.

Instead of using:
VBA Code:
chk = InputBox("Please enter prompt")
    If UCase(chk) = "YES" Then
Try this approach:
VBA Code:
Sub Test()
    If MsgBox("Do you want to proceed?", vbYesNo) = vbYes Then
        'your code here
    End If
End Sub
I made the changes suggested and now get an error "RUN-TIME ERROR '9': SUBSCRIPT OUT OF RANGE".

Here is the revised MACRO, if you could help me find the error, I'd be greatly appreciative. Thank you.


VBA Code:
Sub RESETTRACKER()

'

' RESETTRACKER Macro

' This MACRO will reset the ENTIRE Tracker for a new week, making a copy of the CURRENT WEEK for archive.

'

Dim chk

chk = InputBox("Please enter prompt")

If UCase(chk) = "YES" Then



Sheets("CURRENT WEEK").Select

ActiveSheet.Unprotect

Sheets("SUN").Select

ActiveSheet.Unprotect

Sheets("MON").Select

ActiveSheet.Unprotect

Sheets("TUE").Select

ActiveSheet.Unprotect

Sheets("WED").Select

ActiveSheet.Unprotect

Sheets("THU").Select

ActiveSheet.Unprotect

Sheets("FRI").Select

ActiveSheet.Unprotect

Sheets("SAT").Select

ActiveSheet.Unprotect

Sheets("NEXT MON").Select

ActiveSheet.Unprotect

Sheets("CURRENT WEEK").Select

ActiveSheet.Buttons.Add(328.5, 10.5, 200.5, 24.5).Select

Sheets("CURRENT WEEK").Copy Before:=Sheets(19)

Sheets("CURRENT WEEK (2)").Select

Sheets("CURRENT WEEK (2)").Name = "LAST WEEK"

Cells.Select

Selection.Locked = True

Selection.FormulaHidden = False

Selection.Copy

Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _

:=False, Transpose:=False

Range("A1:J3").Select

Sheets("LAST WEEK").Select

Application.CutCopyMode = False

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

Sheets("CURRENT WEEK").Select

Rows("35:106").Select

Selection.EntireRow.Hidden = True

Rows("34:107").Select

Selection.EntireRow.Hidden = False

Range("EJ6:ES7").Select

Range("EJ6:ES105").Select

Selection.Copy

Range("CB6").Select

Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _

:=False, Transpose:=False

Range("CL6").Select

Range("ES105").Select

Range("CL6:ES105").Select

Range("ES105").Activate

Application.CutCopyMode = False

Selection.ClearContents

Range("S6:T6").Select

Sheets("CURRENT WEEK").Select

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

Sheets("SUN").Select

Rows("34:105").Select

Selection.EntireRow.Hidden = False

Range("O5:Q5").Select

Range("O5:Q104").Select

Selection.ClearContents

Range("S5:U5").Select

Range("S5:U104").Select

Selection.ClearContents

Selection.ClearContents

Range("W5:Y5").Select

Range("W5:Y104").Select

Selection.ClearContents

Range("AA5:AC5").Select

ActiveWindow.SmallScroll Down:=78

Range("AA5:AC104").Select

Selection.ClearContents

ActiveWindow.SmallScroll Down:=-78

Range("AE5:AG5").Select

ActiveWindow.SmallScroll Down:=73

Range("AE5:AG104").Select

Selection.ClearContents

Range("AI5:AT5").Select

Range("AI5:AT104").Select

Selection.ClearContents

Range("I5:J5").Select

Sheets("SUN").Select

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

ActiveWindow.ScrollWorkbookTabs Sheets:=1

Sheets("NEXT MON").Select

Range("O5:Q5").Select

ActiveWindow.SmallScroll Down:=8

Rows("34:105").Select

Selection.EntireRow.Hidden = False

ActiveWindow.SmallScroll Down:=-8

Range("O5:Q5").Select

Range("O5:Q104").Select

Selection.Copy

Sheets("MON").Select

Range("O5").Select

Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _

:=False, Transpose:=False

Sheets("NEXT MON").Select

ActiveWindow.SmallScroll Down:=-68

Range("S5:U5").Select

ActiveWindow.SmallScroll Down:=81

Range("S5:U104").Select

Application.CutCopyMode = False

Selection.Copy

ActiveWindow.SmallScroll Down:=-81

Sheets("MON").Select

Range("S5").Select

Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _

:=False, Transpose:=False

Sheets("NEXT MON").Select

Range("W5:Y5").Select

Range("W5:Y5,Y104").Select

Range("Y104").Activate

Range("W5:Y5,W5:Y104").Select

Range("Y104").Activate

Application.CutCopyMode = False

Range("W5:Y5").Select

ActiveWindow.SmallScroll Down:=70

Range("W5:Y104").Select

Selection.Copy

Sheets("MON").Select

Range("W5").Select

Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _

:=False, Transpose:=False

Sheets("NEXT MON").Select

Range("AA5:AC5").Select

Range("AA5:AC104").Select

Application.CutCopyMode = False

Selection.Copy

Sheets("MON").Select

Range("AA5").Select

Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _

:=False, Transpose:=False

Sheets("NEXT MON").Select

Range("AE5:AG5").Select

Range("AE5:AG104").Select

Application.CutCopyMode = False

Selection.Copy

Sheets("MON").Select

Range("AE5").Select

Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _

:=False, Transpose:=False

Sheets("NEXT MON").Select

Range("AI5:AT5").Select

Range("AI5:AT104").Select

Application.CutCopyMode = False

Selection.Copy

Sheets("MON").Select

Range("AI5").Select

Sheets("NEXT MON").Select

Range("AI5:AM5").Select

Range("AI5:AM104").Select

Application.CutCopyMode = False

Selection.Copy

Sheets("MON").Select

Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _

:=False, Transpose:=False

Sheets("NEXT MON").Select

Range("AN5:AT5").Select

Range("AN5:AT104").Select

Application.CutCopyMode = False

Selection.Copy

Sheets("MON").Select

Range("AN5:AT5").Select

Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _

:=False, Transpose:=False

Sheets("NEXT MON").Select

Range("C5:D5").Select

Range("C5:D104").Select

Application.CutCopyMode = False

Selection.Copy

Sheets("MON").Select

Range("C5:D5").Select

Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _

:=False, Transpose:=False

Sheets("MON").Select

Application.CutCopyMode = False

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _

, AllowSorting:=True

Sheets("NEXT MON").Select

Selection.ClearContents

Range("O5:Q104").Select

Selection.ClearContents

Range("S5:U5").Select

Selection.ClearContents

Range("U104").Select

Selection.ClearContents

Selection.ClearContents

Selection.ClearContents

Selection.ClearContents

Selection.ClearContents

Selection.ClearContents

Range("S5:U104").Select

Range("U104").Activate

Selection.ClearContents

Range("W5:Y5").Select

Range("W5:Y104").Select

Selection.ClearContents

Range("AA5:AC5").Select

Range("AA5:AC104").Select

Selection.ClearContents

Range("AE5:AG5").Select

Range("AE5:AG104").Select

Selection.ClearContents

Range("AI5:AT5").Select

Range("AI5:AT104").Select

Selection.ClearContents

Range("I5:J5").Select

Sheets("NEXT MON").Select

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

Sheets("TUE").Select

Range("O5:Q5").Select

Rows("34:105").Select

Selection.EntireRow.Hidden = False

Range("O5:Q5").Select

Range("O5:Q104").Select

Selection.ClearContents

Range("S5:U5").Select

Range("S5:U104").Select

Selection.ClearContents

Range("W5:Y5").Select

Range("W5:Y104").Select

Selection.ClearContents

Range("AA5:AC5").Select

Range("AA5:AC104").Select

Selection.ClearContents

Range("AE5:AG5").Select

Range("AE5:AG104").Select

Selection.ClearContents

Range("AI5:AT5").Select

Range("AI5:AT104").Select

Selection.ClearContents

Range("C5:D104").Select

Selection.ClearContents

Range("A5:B5").Select

Sheets("TUE").Select

ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _

False, AllowSorting:=True

Sheets("WED").Select

Rows("34:105").Select

Selection.EntireRow.Hidden = False

Range("C5:D5").Select

Range("C5:D104").Select

Selection.ClearContents

Range("O5:Q5").Select

Range("O5:Q104").Select

Selection.ClearContents

Range("S5:U5").Select

Range("S5:U104").Select

Selection.ClearContents

Range("W5:Y5").Select

Range("W5:Y104").Select

Selection.ClearContents

Range("AA5:AC5").Select

Range("AA5:AC104").Select

Selection.ClearContents

Range("AE5:AG5").Select

Range("AE5:AG104").Select

Selection.ClearContents

Range("AI5:AT5").Select

Range("AI5:AT104").Select

Selection.ClearContents

Range("I5:J5").Select

Sheets("WED").Select

ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _

False, AllowSorting:=True

Sheets("THU").Select

Rows("34:105").Select

Selection.EntireRow.Hidden = False

Range("C5:D5").Select

Range("C5:D104").Select

Selection.ClearContents

Range("O5:Q5").Select

Range("O5:Q104").Select

Selection.ClearContents

Range("S5:U5").Select

Range("S5:U104").Select

Selection.ClearContents

Range("W5:Y5").Select

Range("W5:Y104").Select

Selection.ClearContents

Range("AA5:AC5").Select

Range("AA5:AC104").Select

Selection.ClearContents

Range("AE5:AG5").Select

Range("AE5:AG104").Select

Selection.ClearContents

Range("AI5:AT5").Select

Range("AI5:AT104").Select

Selection.ClearContents

Range("I5:J5").Select

Sheets("THU").Select

ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _

False, AllowSorting:=True

Sheets("FRI").Select

Rows("34:105").Select

Selection.EntireRow.Hidden = False

Range("C5:D5").Select

Range("C5:D104").Select

Selection.ClearContents

Range("O5:Q5").Select

Range("O5:Q104").Select

Selection.ClearContents

Range("S5:U5").Select

Range("S5:U104").Select

Selection.ClearContents

Range("W5:Y5").Select

Range("W5:Y104").Select

Selection.ClearContents

Range("AA5:AC5").Select

Range("AA5:AC104").Select

Selection.ClearContents

Range("AE5:AG5").Select

Range("AE5:AG104").Select

Selection.ClearContents

Range("AI5:AT5").Select

Range("AI5:AT104").Select

Selection.ClearContents

Range("I5:J5").Select

Sheets("FRI").Select

ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _

False, AllowSorting:=True

Sheets("SAT").Select

Rows("34:105").Select

Selection.EntireRow.Hidden = False

Range("C5:D5").Select

Range("C5:D104").Select

Selection.ClearContents

Range("O5:Q5").Select

Range("O5:Q104").Select

Selection.ClearContents

Range("S5:U5").Select

Range("S5:U104").Select

Selection.ClearContents

Range("W5:Y5").Select

Range("W5:Y104").Select

Selection.ClearContents

Range("AA5:AC5").Select

Range("AA5:AC104").Select

Selection.ClearContents

Range("AE5:AG5").Select

Range("AE5:AG104").Select

Selection.ClearContents

Range("AI5:AT5").Select

Range("AI5:AT104").Select

Selection.ClearContents

Range("I5:J5").Select

Sheets("SAT").Select

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True



Else

Sub Test()

If MsgBox("Do you want to proceed?", vbYesNo) = vbYes Then

'YES

End If

End Sub
 

Attachments

  • RESET ERROR.png
    RESET ERROR.png
    31.2 KB · Views: 1
Last edited by a moderator:
Upvote 0
@Northern NY Design when posting code please use code tags. see How to Post Your VBA Code
Uh, I think this is what I was supposed to do. Sorry.

VBA Code:
Sub RESETTRACKER()

'

' RESETTRACKER Macro

' This MACRO will reset the ENTIRE Tracker for a new week, making a copy of the CURRENT WEEK for archive.

'

Dim chk

chk = InputBox("Please enter prompt")

If UCase(chk) = "YES" Then



Sheets("CURRENT WEEK").Select

ActiveSheet.Unprotect

Sheets("SUN").Select

ActiveSheet.Unprotect

Sheets("MON").Select

ActiveSheet.Unprotect

Sheets("TUE").Select

ActiveSheet.Unprotect

Sheets("WED").Select

ActiveSheet.Unprotect

Sheets("THU").Select

ActiveSheet.Unprotect

Sheets("FRI").Select

ActiveSheet.Unprotect

Sheets("SAT").Select

ActiveSheet.Unprotect

Sheets("NEXT MON").Select

ActiveSheet.Unprotect

Sheets("CURRENT WEEK").Select

ActiveSheet.Buttons.Add(328.5, 10.5, 200.5, 24.5).Select

Sheets("CURRENT WEEK").Copy Before:=Sheets(19)

Sheets("CURRENT WEEK (2)").Select

Sheets("CURRENT WEEK (2)").Name = "LAST WEEK"

Cells.Select

Selection.Locked = True

Selection.FormulaHidden = False

Selection.Copy

Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _

:=False, Transpose:=False

Range("A1:J3").Select

Sheets("LAST WEEK").Select

Application.CutCopyMode = False

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

Sheets("CURRENT WEEK").Select

Rows("35:106").Select

Selection.EntireRow.Hidden = True

Rows("34:107").Select

Selection.EntireRow.Hidden = False

Range("EJ6:ES7").Select

Range("EJ6:ES105").Select

Selection.Copy

Range("CB6").Select

Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _

:=False, Transpose:=False

Range("CL6").Select

Range("ES105").Select

Range("CL6:ES105").Select

Range("ES105").Activate

Application.CutCopyMode = False

Selection.ClearContents

Range("S6:T6").Select

Sheets("CURRENT WEEK").Select

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

Sheets("SUN").Select

Rows("34:105").Select

Selection.EntireRow.Hidden = False

Range("O5:Q5").Select

Range("O5:Q104").Select

Selection.ClearContents

Range("S5:U5").Select

Range("S5:U104").Select

Selection.ClearContents

Selection.ClearContents

Range("W5:Y5").Select

Range("W5:Y104").Select

Selection.ClearContents

Range("AA5:AC5").Select

ActiveWindow.SmallScroll Down:=78

Range("AA5:AC104").Select

Selection.ClearContents

ActiveWindow.SmallScroll Down:=-78

Range("AE5:AG5").Select

ActiveWindow.SmallScroll Down:=73

Range("AE5:AG104").Select

Selection.ClearContents

Range("AI5:AT5").Select

Range("AI5:AT104").Select

Selection.ClearContents

Range("I5:J5").Select

Sheets("SUN").Select

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

ActiveWindow.ScrollWorkbookTabs Sheets:=1

Sheets("NEXT MON").Select

Range("O5:Q5").Select

ActiveWindow.SmallScroll Down:=8

Rows("34:105").Select

Selection.EntireRow.Hidden = False

ActiveWindow.SmallScroll Down:=-8

Range("O5:Q5").Select

Range("O5:Q104").Select

Selection.Copy

Sheets("MON").Select

Range("O5").Select

Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _

:=False, Transpose:=False

Sheets("NEXT MON").Select

ActiveWindow.SmallScroll Down:=-68

Range("S5:U5").Select

ActiveWindow.SmallScroll Down:=81

Range("S5:U104").Select

Application.CutCopyMode = False

Selection.Copy

ActiveWindow.SmallScroll Down:=-81

Sheets("MON").Select

Range("S5").Select

Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _

:=False, Transpose:=False

Sheets("NEXT MON").Select

Range("W5:Y5").Select

Range("W5:Y5,Y104").Select

Range("Y104").Activate

Range("W5:Y5,W5:Y104").Select

Range("Y104").Activate

Application.CutCopyMode = False

Range("W5:Y5").Select

ActiveWindow.SmallScroll Down:=70

Range("W5:Y104").Select

Selection.Copy

Sheets("MON").Select

Range("W5").Select

Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _

:=False, Transpose:=False

Sheets("NEXT MON").Select

Range("AA5:AC5").Select

Range("AA5:AC104").Select

Application.CutCopyMode = False

Selection.Copy

Sheets("MON").Select

Range("AA5").Select

Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _

:=False, Transpose:=False

Sheets("NEXT MON").Select

Range("AE5:AG5").Select

Range("AE5:AG104").Select

Application.CutCopyMode = False

Selection.Copy

Sheets("MON").Select

Range("AE5").Select

Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _

:=False, Transpose:=False

Sheets("NEXT MON").Select

Range("AI5:AT5").Select

Range("AI5:AT104").Select

Application.CutCopyMode = False

Selection.Copy

Sheets("MON").Select

Range("AI5").Select

Sheets("NEXT MON").Select

Range("AI5:AM5").Select

Range("AI5:AM104").Select

Application.CutCopyMode = False

Selection.Copy

Sheets("MON").Select

Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _

:=False, Transpose:=False

Sheets("NEXT MON").Select

Range("AN5:AT5").Select

Range("AN5:AT104").Select

Application.CutCopyMode = False

Selection.Copy

Sheets("MON").Select

Range("AN5:AT5").Select

Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _

:=False, Transpose:=False

Sheets("NEXT MON").Select

Range("C5:D5").Select

Range("C5:D104").Select

Application.CutCopyMode = False

Selection.Copy

Sheets("MON").Select

Range("C5:D5").Select

Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _

:=False, Transpose:=False

Sheets("MON").Select

Application.CutCopyMode = False

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _

, AllowSorting:=True

Sheets("NEXT MON").Select

Selection.ClearContents

Range("O5:Q104").Select

Selection.ClearContents

Range("S5:U5").Select

Selection.ClearContents

Range("U104").Select

Selection.ClearContents

Selection.ClearContents

Selection.ClearContents

Selection.ClearContents

Selection.ClearContents

Selection.ClearContents

Range("S5:U104").Select

Range("U104").Activate

Selection.ClearContents

Range("W5:Y5").Select

Range("W5:Y104").Select

Selection.ClearContents

Range("AA5:AC5").Select

Range("AA5:AC104").Select

Selection.ClearContents

Range("AE5:AG5").Select

Range("AE5:AG104").Select

Selection.ClearContents

Range("AI5:AT5").Select

Range("AI5:AT104").Select

Selection.ClearContents

Range("I5:J5").Select

Sheets("NEXT MON").Select

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

Sheets("TUE").Select

Range("O5:Q5").Select

Rows("34:105").Select

Selection.EntireRow.Hidden = False

Range("O5:Q5").Select

Range("O5:Q104").Select

Selection.ClearContents

Range("S5:U5").Select

Range("S5:U104").Select

Selection.ClearContents

Range("W5:Y5").Select

Range("W5:Y104").Select

Selection.ClearContents

Range("AA5:AC5").Select

Range("AA5:AC104").Select

Selection.ClearContents

Range("AE5:AG5").Select

Range("AE5:AG104").Select

Selection.ClearContents

Range("AI5:AT5").Select

Range("AI5:AT104").Select

Selection.ClearContents

Range("C5:D104").Select

Selection.ClearContents

Range("A5:B5").Select

Sheets("TUE").Select

ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _

False, AllowSorting:=True

Sheets("WED").Select

Rows("34:105").Select

Selection.EntireRow.Hidden = False

Range("C5:D5").Select

Range("C5:D104").Select

Selection.ClearContents

Range("O5:Q5").Select

Range("O5:Q104").Select

Selection.ClearContents

Range("S5:U5").Select

Range("S5:U104").Select

Selection.ClearContents

Range("W5:Y5").Select

Range("W5:Y104").Select

Selection.ClearContents

Range("AA5:AC5").Select

Range("AA5:AC104").Select

Selection.ClearContents

Range("AE5:AG5").Select

Range("AE5:AG104").Select

Selection.ClearContents

Range("AI5:AT5").Select

Range("AI5:AT104").Select

Selection.ClearContents

Range("I5:J5").Select

Sheets("WED").Select

ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _

False, AllowSorting:=True

Sheets("THU").Select

Rows("34:105").Select

Selection.EntireRow.Hidden = False

Range("C5:D5").Select

Range("C5:D104").Select

Selection.ClearContents

Range("O5:Q5").Select

Range("O5:Q104").Select

Selection.ClearContents

Range("S5:U5").Select

Range("S5:U104").Select

Selection.ClearContents

Range("W5:Y5").Select

Range("W5:Y104").Select

Selection.ClearContents

Range("AA5:AC5").Select

Range("AA5:AC104").Select

Selection.ClearContents

Range("AE5:AG5").Select

Range("AE5:AG104").Select

Selection.ClearContents

Range("AI5:AT5").Select

Range("AI5:AT104").Select

Selection.ClearContents

Range("I5:J5").Select

Sheets("THU").Select

ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _

False, AllowSorting:=True

Sheets("FRI").Select

Rows("34:105").Select

Selection.EntireRow.Hidden = False

Range("C5:D5").Select

Range("C5:D104").Select

Selection.ClearContents

Range("O5:Q5").Select

Range("O5:Q104").Select

Selection.ClearContents

Range("S5:U5").Select

Range("S5:U104").Select

Selection.ClearContents

Range("W5:Y5").Select

Range("W5:Y104").Select

Selection.ClearContents

Range("AA5:AC5").Select

Range("AA5:AC104").Select

Selection.ClearContents

Range("AE5:AG5").Select

Range("AE5:AG104").Select

Selection.ClearContents

Range("AI5:AT5").Select

Range("AI5:AT104").Select

Selection.ClearContents

Range("I5:J5").Select

Sheets("FRI").Select

ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _

False, AllowSorting:=True

Sheets("SAT").Select

Rows("34:105").Select

Selection.EntireRow.Hidden = False

Range("C5:D5").Select

Range("C5:D104").Select

Selection.ClearContents

Range("O5:Q5").Select

Range("O5:Q104").Select

Selection.ClearContents

Range("S5:U5").Select

Range("S5:U104").Select

Selection.ClearContents

Range("W5:Y5").Select

Range("W5:Y104").Select

Selection.ClearContents

Range("AA5:AC5").Select

Range("AA5:AC104").Select

Selection.ClearContents

Range("AE5:AG5").Select

Range("AE5:AG104").Select

Selection.ClearContents

Range("AI5:AT5").Select

Range("AI5:AT104").Select

Selection.ClearContents

Range("I5:J5").Select

Sheets("SAT").Select

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True



Else

Sub Test()

If MsgBox("Do you want to proceed?", vbYesNo) = vbYes Then

'YES

End If
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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