Catyclaire85
New Member
- Joined
- Nov 23, 2021
- Messages
- 20
- Office Version
- 2016
- Platform
- Windows
I have built code for shifts to be created and then uploaded into a different system. Some people work split shifts and others don’t. To make it easier to plan there are options to copy repeats using command buttons. The code I have written works as desired when I run it manually (F5 in VBA), however when run in testing only part of the code works as desired.
Attached are some screenshots and the code for this action.
Where have I gone wrong please?
Attached are some screenshots and the code for this action.
VBA Code:
Sub ShiftView()
Application.ScreenUpdating = False
If Sheet1.Range("D33") = True Then 'split shifts
Sheet2.Range("B6") = "Monday Split 1"
Sheet2.Range("B9") = "Tuesday Split 1"
Sheet2.Range("B12") = "Wednesday Split 1"
Sheet2.Range("B15") = "Thursday Split 1"
Sheet2.Range("B18") = "Friday Split 1"
Sheet2.Range("B21") = "Saturday Split 1"
Sheet2.Range("B24") = "Sunday Split 1"
'1 wk rotation
If Sheet1.ComboBox5 = "1" Then
Sheet1.Range("B5").Copy
Sheet2.Activate
Sheet2.Range("B4").PasteSpecial xlPasteValues
'split copy weeks buttons
Sheet2.CommandButton19.Visible = False 'Wk2 copy week 1
Sheet2.CommandButton20.Visible = False 'Wk3 copy week 1
Sheet2.CommandButton21.Visible = False 'Wk3 copy week 2
Sheet2.CommandButton22.Visible = False 'Wk4 copy week 1
Sheet2.CommandButton23.Visible = False 'Wk4 copy week 2
Sheet2.CommandButton24.Visible = False 'Wk4 copy week 3
Sheet2.CommandButton25.Visible = False 'Wk5 copy week 1
Sheet2.CommandButton26.Visible = False 'Wk5 copy week 2
Sheet2.CommandButton27.Visible = False 'Wk5 copy week 3
Sheet2.CommandButton28.Visible = False 'Wk5 copy week 4
Sheet2.CommandButton29.Visible = False 'Wk6 copy week 1
Sheet2.CommandButton30.Visible = False 'Wk6 copy week 2
Sheet2.CommandButton31.Visible = False 'Wk6 copy week 3
Sheet2.CommandButton32.Visible = False 'Wk6 copy week 4
Sheet2.CommandButton33.Visible = False 'Wk6 copy week 5
'no split copy weeks buttons
Sheet2.CommandButton35.Visible = False 'Wk2 copy week 1 NS
Sheet2.CommandButton36.Visible = False 'Wk3 copy week 1 NS
Sheet2.CommandButton37.Visible = False 'Wk3 copy week 2 NS
Sheet2.CommandButton38.Visible = False 'Wk4 copy week 1 NS
Sheet2.CommandButton39.Visible = False 'Wk4 copy week 2 NS
Sheet2.CommandButton40.Visible = False 'Wk4 copy week 3 NS
Sheet2.CommandButton41.Visible = False 'Wk5 copy week 1 NS
Sheet2.CommandButton42.Visible = False 'Wk5 copy week 2 NS
Sheet2.CommandButton43.Visible = False 'Wk5 copy week 3 NS
Sheet2.CommandButton44.Visible = False 'Wk5 copy week 4 NS
Sheet2.CommandButton45.Visible = False 'Wk6 copy week 1 NS
Sheet2.CommandButton46.Visible = False 'Wk6 copy week 2 NS
Sheet2.CommandButton47.Visible = False 'Wk6 copy week 3 NS
Sheet2.CommandButton48.Visible = False 'Wk6 copy week 4 NS
Sheet2.CommandButton49.Visible = False 'Wk6 copy week 5 NS
Sheet2.Columns("G:Z").EntireColumn.Hidden = True
'copy day segment buttons
Sheet2.CommandButton1.Visible = True 'copy Mon 1
Sheet2.CommandButton2.Visible = True 'copy Mon 2
Sheet2.CommandButton3.Visible = True 'copy Mon 3
Sheet2.CommandButton4.Visible = True 'copy Tue 1
Sheet2.CommandButton5.Visible = True 'copy Tue 2
Sheet2.CommandButton6.Visible = True 'copy Tue 3
Sheet2.CommandButton7.Visible = True 'copy Wed 1
Sheet2.CommandButton8.Visible = True 'copy Wed 2
Sheet2.CommandButton9.Visible = True 'copy Wed 3
Sheet2.CommandButton10.Visible = True 'copy Thu 1
Sheet2.CommandButton11.Visible = True 'copy Thu 2
Sheet2.CommandButton12.Visible = True 'copy Thu 3
Sheet2.CommandButton13.Visible = True 'copy Fri 1
Sheet2.CommandButton14.Visible = True 'copy Fri 2
Sheet2.CommandButton15.Visible = True 'copy Fri 3
Sheet2.CommandButton16.Visible = True 'copy Sat 1
Sheet2.CommandButton17.Visible = True 'copy Sat 2
Sheet2.CommandButton18.Visible = True 'copy Sat 3
Sheet2.Rows("7:8").EntireRow.Hidden = False
Sheet2.Rows("10:11").EntireRow.Hidden = False
Sheet2.Rows("13:14").EntireRow.Hidden = False
Sheet2.Rows("16:17").EntireRow.Hidden = False
Sheet2.Rows("19:20").EntireRow.Hidden = False
Sheet2.Rows("22:23").EntireRow.Hidden = False
Sheet2.Rows("25:26").EntireRow.Hidden = False
'2 wk rotation
Else
If Sheet1.ComboBox5 = "2" Then
Sheet1.Range("B5").Copy
Sheet2.Activate
Sheet2.Range("B4").PasteSpecial xlPasteValues
Sheet2.Columns("G:J").EntireColumn.Hidden = False
Sheet2.Columns("K:Z").EntireColumn.Hidden = True
'split copy weeks buttons
Sheet2.CommandButton19.Visible = True 'Wk2 copy week 1
Sheet2.CommandButton20.Visible = False 'Wk3 copy week 1
Sheet2.CommandButton21.Visible = False 'Wk3 copy week 2
Sheet2.CommandButton22.Visible = False 'Wk4 copy week 1
Sheet2.CommandButton23.Visible = False 'Wk4 copy week 2
Sheet2.CommandButton24.Visible = False 'Wk4 copy week 3
Sheet2.CommandButton25.Visible = False 'Wk5 copy week 1
Sheet2.CommandButton26.Visible = False 'Wk5 copy week 2
Sheet2.CommandButton27.Visible = False 'Wk5 copy week 3
Sheet2.CommandButton28.Visible = False 'Wk5 copy week 4
Sheet2.CommandButton29.Visible = False 'Wk6 copy week 1
Sheet2.CommandButton30.Visible = False 'Wk6 copy week 2
Sheet2.CommandButton31.Visible = False 'Wk6 copy week 3
Sheet2.CommandButton32.Visible = False 'Wk6 copy week 4
Sheet2.CommandButton33.Visible = False 'Wk6 copy week 5
'no split copy weeks buttons
Sheet2.CommandButton35.Visible = False 'Wk2 copy week 1 NS
Sheet2.CommandButton36.Visible = False 'Wk3 copy week 1 NS
Sheet2.CommandButton37.Visible = False 'Wk3 copy week 2 NS
Sheet2.CommandButton38.Visible = False 'Wk4 copy week 1 NS
Sheet2.CommandButton39.Visible = False 'Wk4 copy week 2 NS
Sheet2.CommandButton40.Visible = False 'Wk4 copy week 3 NS
Sheet2.CommandButton41.Visible = False 'Wk5 copy week 1 NS
Sheet2.CommandButton42.Visible = False 'Wk5 copy week 2 NS
Sheet2.CommandButton43.Visible = False 'Wk5 copy week 3 NS
Sheet2.CommandButton44.Visible = False 'Wk5 copy week 4 NS
Sheet2.CommandButton45.Visible = False 'Wk6 copy week 1 NS
Sheet2.CommandButton46.Visible = False 'Wk6 copy week 2 NS
Sheet2.CommandButton47.Visible = False 'Wk6 copy week 3 NS
Sheet2.CommandButton48.Visible = False 'Wk6 copy week 4 NS
Sheet2.CommandButton49.Visible = False 'Wk6 copy week 5 NS
'copy day segment buttons
Sheet2.CommandButton1.Visible = True 'copy Mon 1
Sheet2.CommandButton2.Visible = True 'copy Mon 2
Sheet2.CommandButton3.Visible = True 'copy Mon 3
Sheet2.CommandButton4.Visible = True 'copy Tue 1
Sheet2.CommandButton5.Visible = True 'copy Tue 2
Sheet2.CommandButton6.Visible = True 'copy Tue 3
Sheet2.CommandButton7.Visible = True 'copy Wed 1
Sheet2.CommandButton8.Visible = True 'copy Wed 2
Sheet2.CommandButton9.Visible = True 'copy Wed 3
Sheet2.CommandButton10.Visible = True 'copy Thu 1
Sheet2.CommandButton11.Visible = True 'copy Thu 2
Sheet2.CommandButton12.Visible = True 'copy Thu 3
Sheet2.CommandButton13.Visible = True 'copy Fri 1
Sheet2.CommandButton14.Visible = True 'copy Fri 2
Sheet2.CommandButton15.Visible = True 'copy Fri 3
Sheet2.CommandButton16.Visible = True 'copy Sat 1
Sheet2.CommandButton17.Visible = True 'copy Sat 2
Sheet2.CommandButton18.Visible = True 'copy Sat 3
Sheet2.Rows("7:8").EntireRow.Hidden = False
Sheet2.Rows("10:11").EntireRow.Hidden = False
Sheet2.Rows("13:14").EntireRow.Hidden = False
Sheet2.Rows("16:17").EntireRow.Hidden = False
Sheet2.Rows("19:20").EntireRow.Hidden = False
Sheet2.Rows("22:23").EntireRow.Hidden = False
Sheet2.Rows("25:26").EntireRow.Hidden = False
'3 wk rotation
Else
If Sheet1.ComboBox5 = "3" Then
Sheet1.Range("B5").Copy
Sheet2.Activate
Sheet2.Range("B4").PasteSpecial xlPasteValues
Sheet2.Columns("G:Z").EntireColumn.Hidden = False
Sheet2.Columns("O:Z").EntireColumn.Hidden = True
'split copy weeks buttons
Sheet2.CommandButton19.Visible = True 'Wk2 copy week 1
Sheet2.CommandButton20.Visible = True 'Wk3 copy week 1
Sheet2.CommandButton21.Visible = True 'Wk3 copy week 2
Sheet2.CommandButton22.Visible = False 'Wk4 copy week 1
Sheet2.CommandButton23.Visible = False 'Wk4 copy week 2
Sheet2.CommandButton24.Visible = False 'Wk4 copy week 3
Sheet2.CommandButton25.Visible = False 'Wk5 copy week 1
Sheet2.CommandButton26.Visible = False 'Wk5 copy week 2
Sheet2.CommandButton27.Visible = False 'Wk5 copy week 3
Sheet2.CommandButton28.Visible = False 'Wk5 copy week 4
Sheet2.CommandButton29.Visible = False 'Wk6 copy week 1
Sheet2.CommandButton30.Visible = False 'Wk6 copy week 2
Sheet2.CommandButton31.Visible = False 'Wk6 copy week 3
Sheet2.CommandButton32.Visible = False 'Wk6 copy week 4
Sheet2.CommandButton33.Visible = False 'Wk6 copy week 5
'no split copy weeks buttons
Sheet2.CommandButton35.Visible = False 'Wk2 copy week 1 NS
Sheet2.CommandButton36.Visible = False 'Wk3 copy week 1 NS
Sheet2.CommandButton37.Visible = False 'Wk3 copy week 2 NS
Sheet2.CommandButton38.Visible = False 'Wk4 copy week 1 NS
Sheet2.CommandButton39.Visible = False 'Wk4 copy week 2 NS
Sheet2.CommandButton40.Visible = False 'Wk4 copy week 3 NS
Sheet2.CommandButton41.Visible = False 'Wk5 copy week 1 NS
Sheet2.CommandButton42.Visible = False 'Wk5 copy week 2 NS
Sheet2.CommandButton43.Visible = False 'Wk5 copy week 3 NS
Sheet2.CommandButton44.Visible = False 'Wk5 copy week 4 NS
Sheet2.CommandButton45.Visible = False 'Wk6 copy week 1 NS
Sheet2.CommandButton46.Visible = False 'Wk6 copy week 2 NS
Sheet2.CommandButton47.Visible = False 'Wk6 copy week 3 NS
Sheet2.CommandButton48.Visible = False 'Wk6 copy week 4 NS
Sheet2.CommandButton49.Visible = False 'Wk6 copy week 5 NS
'copy day segment buttons
Sheet2.CommandButton1.Visible = True 'copy Mon 1
Sheet2.CommandButton2.Visible = True 'copy Mon 2
Sheet2.CommandButton3.Visible = True 'copy Mon 3
Sheet2.CommandButton4.Visible = True 'copy Tue 1
Sheet2.CommandButton5.Visible = True 'copy Tue 2
Sheet2.CommandButton6.Visible = True 'copy Tue 3
Sheet2.CommandButton7.Visible = True 'copy Wed 1
Sheet2.CommandButton8.Visible = True 'copy Wed 2
Sheet2.CommandButton9.Visible = True 'copy Wed 3
Sheet2.CommandButton10.Visible = True 'copy Thu 1
Sheet2.CommandButton11.Visible = True 'copy Thu 2
Sheet2.CommandButton12.Visible = True 'copy Thu 3
Sheet2.CommandButton13.Visible = True 'copy Fri 1
Sheet2.CommandButton14.Visible = True 'copy Fri 2
Sheet2.CommandButton15.Visible = True 'copy Fri 3
Sheet2.CommandButton16.Visible = True 'copy Sat 1
Sheet2.CommandButton17.Visible = True 'copy Sat 2
Sheet2.CommandButton18.Visible = True 'copy Sat 3
Sheet2.Rows("7:8").EntireRow.Hidden = False
Sheet2.Rows("10:11").EntireRow.Hidden = False
Sheet2.Rows("13:14").EntireRow.Hidden = False
Sheet2.Rows("16:17").EntireRow.Hidden = False
Sheet2.Rows("19:20").EntireRow.Hidden = False
Sheet2.Rows("22:23").EntireRow.Hidden = False
Sheet2.Rows("25:26").EntireRow.Hidden = False
'4 wk rotation
Else
If Sheet1.ComboBox5 = "4" Then
Sheet1.Range("B5").Copy
Sheet2.Activate
Sheet2.Range("B4").PasteSpecial xlPasteValues
Sheet2.Columns("G:R").EntireColumn.Hidden = False
Sheet2.Columns("S:Z").EntireColumn.Hidden = True
'split copy weeks buttons
Sheet2.CommandButton19.Visible = True 'Wk2 copy week 1
Sheet2.CommandButton20.Visible = True 'Wk3 copy week 1
Sheet2.CommandButton21.Visible = True 'Wk3 copy week 2
Sheet2.CommandButton22.Visible = True 'Wk4 copy week 1
Sheet2.CommandButton23.Visible = True 'Wk4 copy week 2
Sheet2.CommandButton24.Visible = True 'Wk4 copy week 3
Sheet2.CommandButton25.Visible = False 'Wk5 copy week 1
Sheet2.CommandButton26.Visible = False 'Wk5 copy week 2
Sheet2.CommandButton27.Visible = False 'Wk5 copy week 3
Sheet2.CommandButton28.Visible = False 'Wk5 copy week 4
Sheet2.CommandButton29.Visible = False 'Wk6 copy week 1
Sheet2.CommandButton30.Visible = False 'Wk6 copy week 2
Sheet2.CommandButton31.Visible = False 'Wk6 copy week 3
Sheet2.CommandButton32.Visible = False 'Wk6 copy week 4
Sheet2.CommandButton33.Visible = False 'Wk6 copy week 5
'no split copy weeks buttons
Sheet2.CommandButton35.Visible = False 'Wk2 copy week 1 NS
Sheet2.CommandButton36.Visible = False 'Wk3 copy week 1 NS
Sheet2.CommandButton37.Visible = False 'Wk3 copy week 2 NS
Sheet2.CommandButton38.Visible = False 'Wk4 copy week 1 NS
Sheet2.CommandButton39.Visible = False 'Wk4 copy week 2 NS
Sheet2.CommandButton40.Visible = False 'Wk4 copy week 3 NS
Sheet2.CommandButton41.Visible = False 'Wk5 copy week 1 NS
Sheet2.CommandButton42.Visible = False 'Wk5 copy week 2 NS
Sheet2.CommandButton43.Visible = False 'Wk5 copy week 3 NS
Sheet2.CommandButton44.Visible = False 'Wk5 copy week 4 NS
Sheet2.CommandButton45.Visible = False 'Wk6 copy week 1 NS
Sheet2.CommandButton46.Visible = False 'Wk6 copy week 2 NS
Sheet2.CommandButton47.Visible = False 'Wk6 copy week 3 NS
Sheet2.CommandButton48.Visible = False 'Wk6 copy week 4 NS
Sheet2.CommandButton49.Visible = False 'Wk6 copy week 5 NS
'copy day segment buttons
Sheet2.CommandButton1.Visible = True 'copy Mon 1
Sheet2.CommandButton2.Visible = True 'copy Mon 2
Sheet2.CommandButton3.Visible = True 'copy Mon 3
Sheet2.CommandButton4.Visible = True 'copy Tue 1
Sheet2.CommandButton5.Visible = True 'copy Tue 2
Sheet2.CommandButton6.Visible = True 'copy Tue 3
Sheet2.CommandButton7.Visible = True 'copy Wed 1
Sheet2.CommandButton8.Visible = True 'copy Wed 2
Sheet2.CommandButton9.Visible = True 'copy Wed 3
Sheet2.CommandButton10.Visible = True 'copy Thu 1
Sheet2.CommandButton11.Visible = True 'copy Thu 2
Sheet2.CommandButton12.Visible = True 'copy Thu 3
Sheet2.CommandButton13.Visible = True 'copy Fri 1
Sheet2.CommandButton14.Visible = True 'copy Fri 2
Sheet2.CommandButton15.Visible = True 'copy Fri 3
Sheet2.CommandButton16.Visible = True 'copy Sat 1
Sheet2.CommandButton17.Visible = True 'copy Sat 2
Sheet2.CommandButton18.Visible = True 'copy Sat 3
Sheet2.Rows("7:8").EntireRow.Hidden = False
Sheet2.Rows("10:11").EntireRow.Hidden = False
Sheet2.Rows("13:14").EntireRow.Hidden = False
Sheet2.Rows("16:17").EntireRow.Hidden = False
Sheet2.Rows("19:20").EntireRow.Hidden = False
Sheet2.Rows("22:23").EntireRow.Hidden = False
Sheet2.Rows("25:26").EntireRow.Hidden = False
'5 wk rotation
Else
If Sheet1.ComboBox5 = "5" Then
Sheet1.Range("B5").Copy
Sheet2.Activate
Sheet2.Range("B4").PasteSpecial xlPasteValues
Sheet2.Columns("G:V").EntireColumn.Hidden = False
Sheet2.Columns("W:Z").EntireColumn.Hidden = True
'split copy weeks buttons
Sheet2.CommandButton19.Visible = True 'Wk2 copy week 1
Sheet2.CommandButton20.Visible = True 'Wk3 copy week 1
Sheet2.CommandButton21.Visible = True 'Wk3 copy week 2
Sheet2.CommandButton22.Visible = True 'Wk4 copy week 1
Sheet2.CommandButton23.Visible = True 'Wk4 copy week 2
Sheet2.CommandButton24.Visible = True 'Wk4 copy week 3
Sheet2.CommandButton25.Visible = True 'Wk5 copy week 1
Sheet2.CommandButton26.Visible = True 'Wk5 copy week 2
Sheet2.CommandButton27.Visible = True 'Wk5 copy week 3
Sheet2.CommandButton28.Visible = True 'Wk5 copy week 4
Sheet2.CommandButton29.Visible = False 'Wk6 copy week 1
Sheet2.CommandButton30.Visible = False 'Wk6 copy week 2
Sheet2.CommandButton31.Visible = False 'Wk6 copy week 3
Sheet2.CommandButton32.Visible = False 'Wk6 copy week 4
Sheet2.CommandButton33.Visible = False 'Wk6 copy week 5
'no split copy weeks buttons
Sheet2.CommandButton35.Visible = False 'Wk2 copy week 1 NS
Sheet2.CommandButton36.Visible = False 'Wk3 copy week 1 NS
Sheet2.CommandButton37.Visible = False 'Wk3 copy week 2 NS
Sheet2.CommandButton38.Visible = False 'Wk4 copy week 1 NS
Sheet2.CommandButton39.Visible = False 'Wk4 copy week 2 NS
Sheet2.CommandButton40.Visible = False 'Wk4 copy week 3 NS
Sheet2.CommandButton41.Visible = False 'Wk5 copy week 1 NS
Sheet2.CommandButton42.Visible = False 'Wk5 copy week 2 NS
Sheet2.CommandButton43.Visible = False 'Wk5 copy week 3 NS
Sheet2.CommandButton44.Visible = False 'Wk5 copy week 4 NS
Sheet2.CommandButton45.Visible = False 'Wk6 copy week 1 NS
Sheet2.CommandButton46.Visible = False 'Wk6 copy week 2 NS
Sheet2.CommandButton47.Visible = False 'Wk6 copy week 3 NS
Sheet2.CommandButton48.Visible = False 'Wk6 copy week 4 NS
Sheet2.CommandButton49.Visible = False 'Wk6 copy week 5 NS
'copy day segment buttons
Sheet2.CommandButton1.Visible = True 'copy Mon 1
Sheet2.CommandButton2.Visible = True 'copy Mon 2
Sheet2.CommandButton3.Visible = True 'copy Mon 3
Sheet2.CommandButton4.Visible = True 'copy Tue 1
Sheet2.CommandButton5.Visible = True 'copy Tue 2
Sheet2.CommandButton6.Visible = True 'copy Tue 3
Sheet2.CommandButton7.Visible = True 'copy Wed 1
Sheet2.CommandButton8.Visible = True 'copy Wed 2
Sheet2.CommandButton9.Visible = True 'copy Wed 3
Sheet2.CommandButton10.Visible = True 'copy Thu 1
Sheet2.CommandButton11.Visible = True 'copy Thu 2
Sheet2.CommandButton12.Visible = True 'copy Thu 3
Sheet2.CommandButton13.Visible = True 'copy Fri 1
Sheet2.CommandButton14.Visible = True 'copy Fri 2
Sheet2.CommandButton15.Visible = True 'copy Fri 3
Sheet2.CommandButton16.Visible = True 'copy Sat 1
Sheet2.CommandButton17.Visible = True 'copy Sat 2
Sheet2.CommandButton18.Visible = True 'copy Sat 3
Sheet2.Rows("7:8").EntireRow.Hidden = False
Sheet2.Rows("10:11").EntireRow.Hidden = False
Sheet2.Rows("13:14").EntireRow.Hidden = False
Sheet2.Rows("16:17").EntireRow.Hidden = False
Sheet2.Rows("19:20").EntireRow.Hidden = False
Sheet2.Rows("22:23").EntireRow.Hidden = False
Sheet2.Rows("25:26").EntireRow.Hidden = False
'6 wk rotation
Else
If Sheet1.ComboBox5 = "6" Then
Sheet1.Range("B5").Copy
Sheet2.Activate
Sheet2.Range("B4").PasteSpecial xlPasteValues
Sheet2.Columns("G:Z").EntireColumn.Hidden = False
'split copy weeks buttons
Sheet2.CommandButton19.Visible = True 'Wk2 copy week 1
Sheet2.CommandButton20.Visible = True 'Wk3 copy week 1
Sheet2.CommandButton21.Visible = True 'Wk3 copy week 2
Sheet2.CommandButton22.Visible = True 'Wk4 copy week 1
Sheet2.CommandButton23.Visible = True 'Wk4 copy week 2
Sheet2.CommandButton24.Visible = True 'Wk4 copy week 3
Sheet2.CommandButton25.Visible = True 'Wk5 copy week 1
Sheet2.CommandButton26.Visible = True 'Wk5 copy week 2
Sheet2.CommandButton27.Visible = True 'Wk5 copy week 3
Sheet2.CommandButton28.Visible = True 'Wk5 copy week 4
Sheet2.CommandButton29.Visible = False 'Wk6 copy week 1
Sheet2.CommandButton30.Visible = False 'Wk6 copy week 2
Sheet2.CommandButton31.Visible = False 'Wk6 copy week 3
Sheet2.CommandButton32.Visible = False 'Wk6 copy week 4
Sheet2.CommandButton33.Visible = False 'Wk6 copy week 5
'no split copy weeks buttons
Sheet2.CommandButton35.Visible = False 'Wk2 copy week 1 NS
Sheet2.CommandButton36.Visible = False 'Wk3 copy week 1 NS
Sheet2.CommandButton37.Visible = False 'Wk3 copy week 2 NS
Sheet2.CommandButton38.Visible = False 'Wk4 copy week 1 NS
Sheet2.CommandButton39.Visible = False 'Wk4 copy week 2 NS
Sheet2.CommandButton40.Visible = False 'Wk4 copy week 3 NS
Sheet2.CommandButton41.Visible = False 'Wk5 copy week 1 NS
Sheet2.CommandButton42.Visible = False 'Wk5 copy week 2 NS
Sheet2.CommandButton43.Visible = False 'Wk5 copy week 3 NS
Sheet2.CommandButton44.Visible = False 'Wk5 copy week 4 NS
Sheet2.CommandButton45.Visible = False 'Wk6 copy week 1 NS
Sheet2.CommandButton46.Visible = False 'Wk6 copy week 2 NS
Sheet2.CommandButton47.Visible = False 'Wk6 copy week 3 NS
Sheet2.CommandButton48.Visible = False 'Wk6 copy week 4 NS
Sheet2.CommandButton49.Visible = False 'Wk6 copy week 5 NS
'copy day segment buttons
Sheet2.CommandButton1.Visible = True 'copy Mon 1
Sheet2.CommandButton2.Visible = True 'copy Mon 2
Sheet2.CommandButton3.Visible = True 'copy Mon 3
Sheet2.CommandButton4.Visible = True 'copy Tue 1
Sheet2.CommandButton5.Visible = True 'copy Tue 2
Sheet2.CommandButton6.Visible = True 'copy Tue 3
Sheet2.CommandButton7.Visible = True 'copy Wed 1
Sheet2.CommandButton8.Visible = True 'copy Wed 2
Sheet2.CommandButton9.Visible = True 'copy Wed 3
Sheet2.CommandButton10.Visible = True 'copy Thu 1
Sheet2.CommandButton11.Visible = True 'copy Thu 2
Sheet2.CommandButton12.Visible = True 'copy Thu 3
Sheet2.CommandButton13.Visible = True 'copy Fri 1
Sheet2.CommandButton14.Visible = True 'copy Fri 2
Sheet2.CommandButton15.Visible = True 'copy Fri 3
Sheet2.CommandButton16.Visible = True 'copy Sat 1
Sheet2.CommandButton17.Visible = True 'copy Sat 2
Sheet2.CommandButton18.Visible = True 'copy Sat 3
Sheet2.Rows("7:8").EntireRow.Hidden = False
Sheet2.Rows("10:11").EntireRow.Hidden = False
Sheet2.Rows("13:14").EntireRow.Hidden = False
Sheet2.Rows("16:17").EntireRow.Hidden = False
Sheet2.Rows("19:20").EntireRow.Hidden = False
Sheet2.Rows("22:23").EntireRow.Hidden = False
Sheet2.Rows("25:26").EntireRow.Hidden = False
End If
End If
End If
End If
End If
End If
Else
'None split shifts
If Sheet1.Range("E33") = True Then
Sheet2.Range("B6") = "Monday"
Sheet2.Range("B9") = "Tuesday"
Sheet2.Range("B12") = "Wednesday"
Sheet2.Range("B15") = "Thursday"
Sheet2.Range("B18") = "Friday"
Sheet2.Range("B21") = "Saturday"
Sheet2.Range("B24") = "Sunday"
Sheet2.Rows("7:8").EntireRow.Hidden = True
Sheet2.Rows("10:11").EntireRow.Hidden = True
Sheet2.Rows("13:14").EntireRow.Hidden = True
Sheet2.Rows("16:17").EntireRow.Hidden = True
Sheet2.Rows("19:20").EntireRow.Hidden = True
Sheet2.Rows("22:23").EntireRow.Hidden = True
Sheet2.Rows("25:26").EntireRow.Hidden = True
'1 week rotation
If Sheet1.ComboBox5 = "1" Then
Sheet1.Range("B5").Copy
Sheet2.Activate
Sheet2.Range("B4").PasteSpecial xlPasteValues
'split copy weeks buttons
Sheet2.CommandButton19.Visible = False 'Wk2 copy week 1
Sheet2.CommandButton20.Visible = False 'Wk3 copy week 1
Sheet2.CommandButton21.Visible = False 'Wk3 copy week 2
Sheet2.CommandButton22.Visible = False 'Wk4 copy week 1
Sheet2.CommandButton23.Visible = False 'Wk4 copy week 2
Sheet2.CommandButton24.Visible = False 'Wk4 copy week 3
Sheet2.CommandButton25.Visible = False 'Wk5 copy week 1
Sheet2.CommandButton26.Visible = False 'Wk5 copy week 2
Sheet2.CommandButton27.Visible = False 'Wk5 copy week 3
Sheet2.CommandButton28.Visible = False 'Wk5 copy week 4
Sheet2.CommandButton29.Visible = False 'Wk6 copy week 1
Sheet2.CommandButton30.Visible = False 'Wk6 copy week 2
Sheet2.CommandButton31.Visible = False 'Wk6 copy week 3
Sheet2.CommandButton32.Visible = False 'Wk6 copy week 4
Sheet2.CommandButton33.Visible = False 'Wk6 copy week 5
'no split copy weeks buttons
Sheet2.CommandButton35.Visible = False 'Wk2 copy week 1 NS
Sheet2.CommandButton36.Visible = False 'Wk3 copy week 1 NS
Sheet2.CommandButton37.Visible = False 'Wk3 copy week 2 NS
Sheet2.CommandButton38.Visible = False 'Wk4 copy week 1 NS
Sheet2.CommandButton39.Visible = False 'Wk4 copy week 2 NS
Sheet2.CommandButton40.Visible = False 'Wk4 copy week 3 NS
Sheet2.CommandButton41.Visible = False 'Wk5 copy week 1 NS
Sheet2.CommandButton42.Visible = False 'Wk5 copy week 2 NS
Sheet2.CommandButton43.Visible = False 'Wk5 copy week 3 NS
Sheet2.CommandButton44.Visible = False 'Wk5 copy week 4 NS
Sheet2.CommandButton45.Visible = False 'Wk6 copy week 1 NS
Sheet2.CommandButton46.Visible = False 'Wk6 copy week 2 NS
Sheet2.CommandButton47.Visible = False 'Wk6 copy week 3 NS
Sheet2.CommandButton48.Visible = False 'Wk6 copy week 4 NS
Sheet2.CommandButton49.Visible = False 'Wk6 copy week 5 NS
'copy day segment buttons
Sheet2.CommandButton1.Visible = True 'copy Mon 1
Sheet2.CommandButton2.Visible = False 'copy Mon 2
Sheet2.CommandButton3.Visible = False 'copy Mon 3
Sheet2.CommandButton4.Visible = True 'copy Tue 1
Sheet2.CommandButton5.Visible = False 'copy Tue 2
Sheet2.CommandButton6.Visible = False 'copy Tue 3
Sheet2.CommandButton7.Visible = True 'copy Wed 1
Sheet2.CommandButton8.Visible = False 'copy Wed 2
Sheet2.CommandButton9.Visible = False 'copy Wed 3
Sheet2.CommandButton10.Visible = True 'copy Thu 1
Sheet2.CommandButton11.Visible = False 'copy Thu 2
Sheet2.CommandButton12.Visible = False 'copy Thu 3
Sheet2.CommandButton13.Visible = True 'copy Fri 1
Sheet2.CommandButton14.Visible = False 'copy Fri 2
Sheet2.CommandButton15.Visible = False 'copy Fri 3
Sheet2.CommandButton16.Visible = True 'copy Sat 1
Sheet2.CommandButton17.Visible = False 'copy Sat 2
Sheet2.CommandButton18.Visible = False 'copy Sat 3
Sheet2.Columns("G:Z").EntireColumn.Hidden = True
'2 week rotation
Else
If Sheet1.ComboBox5 = "2" Then
Sheet1.Range("B5").Copy
Sheet2.Activate
Sheet2.Range("B4").PasteSpecial xlPasteValues
Sheet2.Columns("G:J").EntireColumn.Hidden = False
Sheet2.Columns("K:Z").EntireColumn.Hidden = True
'split copy weeks buttons
Sheet2.CommandButton19.Visible = False 'Wk2 copy week 1
Sheet2.CommandButton20.Visible = False 'Wk3 copy week 1
Sheet2.CommandButton21.Visible = False 'Wk3 copy week 2
Sheet2.CommandButton22.Visible = False 'Wk4 copy week 1
Sheet2.CommandButton23.Visible = False 'Wk4 copy week 2
Sheet2.CommandButton24.Visible = False 'Wk4 copy week 3
Sheet2.CommandButton25.Visible = False 'Wk5 copy week 1
Sheet2.CommandButton26.Visible = False 'Wk5 copy week 2
Sheet2.CommandButton27.Visible = False 'Wk5 copy week 3
Sheet2.CommandButton28.Visible = False 'Wk5 copy week 4
Sheet2.CommandButton29.Visible = False 'Wk6 copy week 1
Sheet2.CommandButton30.Visible = False 'Wk6 copy week 2
Sheet2.CommandButton31.Visible = False 'Wk6 copy week 3
Sheet2.CommandButton32.Visible = False 'Wk6 copy week 4
Sheet2.CommandButton33.Visible = False 'Wk6 copy week 5
'no split copy weeks buttons
Sheet2.CommandButton35.Visible = True 'Wk2 copy week 1 NS
Sheet2.CommandButton36.Visible = False 'Wk3 copy week 1 NS
Sheet2.CommandButton37.Visible = False 'Wk3 copy week 2 NS
Sheet2.CommandButton38.Visible = False 'Wk4 copy week 1 NS
Sheet2.CommandButton39.Visible = False 'Wk4 copy week 2 NS
Sheet2.CommandButton40.Visible = False 'Wk4 copy week 3 NS
Sheet2.CommandButton41.Visible = False 'Wk5 copy week 1 NS
Sheet2.CommandButton42.Visible = False 'Wk5 copy week 2 NS
Sheet2.CommandButton43.Visible = False 'Wk5 copy week 3 NS
Sheet2.CommandButton44.Visible = False 'Wk5 copy week 4 NS
Sheet2.CommandButton45.Visible = False 'Wk6 copy week 1 NS
Sheet2.CommandButton46.Visible = False 'Wk6 copy week 2 NS
Sheet2.CommandButton47.Visible = False 'Wk6 copy week 3 NS
Sheet2.CommandButton48.Visible = False 'Wk6 copy week 4 NS
Sheet2.CommandButton49.Visible = False 'Wk6 copy week 5 NS
'copy day segment buttons
Sheet2.CommandButton1.Visible = True 'copy Mon 1
Sheet2.CommandButton2.Visible = False 'copy Mon 2
Sheet2.CommandButton3.Visible = False 'copy Mon 3
Sheet2.CommandButton4.Visible = True 'copy Tue 1
Sheet2.CommandButton5.Visible = False 'copy Tue 2
Sheet2.CommandButton6.Visible = False 'copy Tue 3
Sheet2.CommandButton7.Visible = True 'copy Wed 1
Sheet2.CommandButton8.Visible = False 'copy Wed 2
Sheet2.CommandButton9.Visible = False 'copy Wed 3
Sheet2.CommandButton10.Visible = True 'copy Thu 1
Sheet2.CommandButton11.Visible = False 'copy Thu 2
Sheet2.CommandButton12.Visible = False 'copy Thu 3
Sheet2.CommandButton13.Visible = True 'copy Fri 1
Sheet2.CommandButton14.Visible = False 'copy Fri 2
Sheet2.CommandButton15.Visible = False 'copy Fri 3
Sheet2.CommandButton16.Visible = True 'copy Sat 1
Sheet2.CommandButton17.Visible = False 'copy Sat 2
Sheet2.CommandButton18.Visible = False 'copy Sat 3
'3 week rotation
Else
If Sheet1.ComboBox5 = "3" Then
Sheet1.Range("B5").Copy
Sheet2.Activate
Sheet2.Range("B4").PasteSpecial xlPasteValues
Sheet2.Columns("G:N").EntireColumn.Hidden = False
Sheet2.Columns("O:Z").EntireColumn.Hidden = True
'split copy weeks buttons
Sheet2.CommandButton19.Visible = False 'Wk2 copy week 1
Sheet2.CommandButton20.Visible = False 'Wk3 copy week 1
Sheet2.CommandButton21.Visible = False 'Wk3 copy week 2
Sheet2.CommandButton22.Visible = False 'Wk4 copy week 1
Sheet2.CommandButton23.Visible = False 'Wk4 copy week 2
Sheet2.CommandButton24.Visible = False 'Wk4 copy week 3
Sheet2.CommandButton25.Visible = False 'Wk5 copy week 1
Sheet2.CommandButton26.Visible = False 'Wk5 copy week 2
Sheet2.CommandButton27.Visible = False 'Wk5 copy week 3
Sheet2.CommandButton28.Visible = False 'Wk5 copy week 4
Sheet2.CommandButton29.Visible = False 'Wk6 copy week 1
Sheet2.CommandButton30.Visible = False 'Wk6 copy week 2
Sheet2.CommandButton31.Visible = False 'Wk6 copy week 3
Sheet2.CommandButton32.Visible = False 'Wk6 copy week 4
Sheet2.CommandButton33.Visible = False 'Wk6 copy week 5
'no split copy weeks buttons
Sheet2.CommandButton35.Visible = True 'Wk2 copy week 1 NS
Sheet2.CommandButton36.Visible = True 'Wk3 copy week 1 NS
Sheet2.CommandButton37.Visible = True 'Wk3 copy week 2 NS
Sheet2.CommandButton38.Visible = False 'Wk4 copy week 1 NS
Sheet2.CommandButton39.Visible = False 'Wk4 copy week 2 NS
Sheet2.CommandButton40.Visible = False 'Wk4 copy week 3 NS
Sheet2.CommandButton41.Visible = False 'Wk5 copy week 1 NS
Sheet2.CommandButton42.Visible = False 'Wk5 copy week 2 NS
Sheet2.CommandButton43.Visible = False 'Wk5 copy week 3 NS
Sheet2.CommandButton44.Visible = False 'Wk5 copy week 4 NS
Sheet2.CommandButton45.Visible = False 'Wk6 copy week 1 NS
Sheet2.CommandButton46.Visible = False 'Wk6 copy week 2 NS
Sheet2.CommandButton47.Visible = False 'Wk6 copy week 3 NS
Sheet2.CommandButton48.Visible = False 'Wk6 copy week 4 NS
Sheet2.CommandButton49.Visible = False 'Wk6 copy week 5 NS
'copy day segment buttons
Sheet2.CommandButton1.Visible = True 'copy Mon 1
Sheet2.CommandButton2.Visible = False 'copy Mon 2
Sheet2.CommandButton3.Visible = False 'copy Mon 3
Sheet2.CommandButton4.Visible = True 'copy Tue 1
Sheet2.CommandButton5.Visible = False 'copy Tue 2
Sheet2.CommandButton6.Visible = False 'copy Tue 3
Sheet2.CommandButton7.Visible = True 'copy Wed 1
Sheet2.CommandButton8.Visible = False 'copy Wed 2
Sheet2.CommandButton9.Visible = False 'copy Wed 3
Sheet2.CommandButton10.Visible = True 'copy Thu 1
Sheet2.CommandButton11.Visible = False 'copy Thu 2
Sheet2.CommandButton12.Visible = False 'copy Thu 3
Sheet2.CommandButton13.Visible = True 'copy Fri 1
Sheet2.CommandButton14.Visible = False 'copy Fri 2
Sheet2.CommandButton15.Visible = False 'copy Fri 3
Sheet2.CommandButton16.Visible = True 'copy Sat 1
Sheet2.CommandButton17.Visible = False 'copy Sat 2
Sheet2.CommandButton18.Visible = False 'copy Sat 3
'4 week rotation
Else
If Sheet1.ComboBox5 = "4" Then
Sheet1.Range("B5").Copy
Sheet2.Activate
Sheet2.Range("B4").PasteSpecial xlPasteValues
Sheet2.Columns("G:R").EntireColumn.Hidden = False
Sheet2.Columns("S:Z").EntireColumn.Hidden = True
'split copy weeks buttons
Sheet2.CommandButton19.Visible = False 'Wk2 copy week 1
Sheet2.CommandButton20.Visible = False 'Wk3 copy week 1
Sheet2.CommandButton21.Visible = False 'Wk3 copy week 2
Sheet2.CommandButton22.Visible = False 'Wk4 copy week 1
Sheet2.CommandButton23.Visible = False 'Wk4 copy week 2
Sheet2.CommandButton24.Visible = False 'Wk4 copy week 3
Sheet2.CommandButton25.Visible = False 'Wk5 copy week 1
Sheet2.CommandButton26.Visible = False 'Wk5 copy week 2
Sheet2.CommandButton27.Visible = False 'Wk5 copy week 3
Sheet2.CommandButton28.Visible = False 'Wk5 copy week 4
Sheet2.CommandButton29.Visible = False 'Wk6 copy week 1
Sheet2.CommandButton30.Visible = False 'Wk6 copy week 2
Sheet2.CommandButton31.Visible = False 'Wk6 copy week 3
Sheet2.CommandButton32.Visible = False 'Wk6 copy week 4
Sheet2.CommandButton33.Visible = False 'Wk6 copy week 5
'no split copy weeks buttons
Sheet2.CommandButton35.Visible = True 'Wk2 copy week 1 NS
Sheet2.CommandButton36.Visible = True 'Wk3 copy week 1 NS
Sheet2.CommandButton37.Visible = True 'Wk3 copy week 2 NS
Sheet2.CommandButton38.Visible = True 'Wk4 copy week 1 NS
Sheet2.CommandButton39.Visible = True 'Wk4 copy week 2 NS
Sheet2.CommandButton40.Visible = True 'Wk4 copy week 3 NS
Sheet2.CommandButton41.Visible = False 'Wk5 copy week 1 NS
Sheet2.CommandButton42.Visible = False 'Wk5 copy week 2 NS
Sheet2.CommandButton43.Visible = False 'Wk5 copy week 3 NS
Sheet2.CommandButton44.Visible = False 'Wk5 copy week 4 NS
Sheet2.CommandButton45.Visible = False 'Wk6 copy week 1 NS
Sheet2.CommandButton46.Visible = False 'Wk6 copy week 2 NS
Sheet2.CommandButton47.Visible = False 'Wk6 copy week 3 NS
Sheet2.CommandButton48.Visible = False 'Wk6 copy week 4 NS
Sheet2.CommandButton49.Visible = False 'Wk6 copy week 5 NS
'copy day segment buttons
Sheet2.CommandButton1.Visible = True 'copy Mon 1
Sheet2.CommandButton2.Visible = False 'copy Mon 2
Sheet2.CommandButton3.Visible = False 'copy Mon 3
Sheet2.CommandButton4.Visible = True 'copy Tue 1
Sheet2.CommandButton5.Visible = False 'copy Tue 2
Sheet2.CommandButton6.Visible = False 'copy Tue 3
Sheet2.CommandButton7.Visible = True 'copy Wed 1
Sheet2.CommandButton8.Visible = False 'copy Wed 2
Sheet2.CommandButton9.Visible = False 'copy Wed 3
Sheet2.CommandButton10.Visible = True 'copy Thu 1
Sheet2.CommandButton11.Visible = False 'copy Thu 2
Sheet2.CommandButton12.Visible = False 'copy Thu 3
Sheet2.CommandButton13.Visible = True 'copy Fri 1
Sheet2.CommandButton14.Visible = False 'copy Fri 2
Sheet2.CommandButton15.Visible = False 'copy Fri 3
Sheet2.CommandButton16.Visible = True 'copy Sat 1
Sheet2.CommandButton17.Visible = False 'copy Sat 2
Sheet2.CommandButton18.Visible = False 'copy Sat 3
'5 wk rotation
Else
If Sheet1.ComboBox5 = "5" Then
Sheet1.Range("B5").Copy
Sheet2.Activate
Sheet2.Range("B4").PasteSpecial xlPasteValues
Sheet2.Columns("G:V").EntireColumn.Hidden = False
Sheet2.Columns("W:Z").EntireColumn.Hidden = True
'split copy weeks buttons
Sheet2.CommandButton19.Visible = False 'Wk2 copy week 1
Sheet2.CommandButton20.Visible = False 'Wk3 copy week 1
Sheet2.CommandButton21.Visible = False 'Wk3 copy week 2
Sheet2.CommandButton22.Visible = False 'Wk4 copy week 1
Sheet2.CommandButton23.Visible = False 'Wk4 copy week 2
Sheet2.CommandButton24.Visible = False 'Wk4 copy week 3
Sheet2.CommandButton25.Visible = False 'Wk5 copy week 1
Sheet2.CommandButton26.Visible = False 'Wk5 copy week 2
Sheet2.CommandButton27.Visible = False 'Wk5 copy week 3
Sheet2.CommandButton28.Visible = False 'Wk5 copy week 4
Sheet2.CommandButton29.Visible = False 'Wk6 copy week 1
Sheet2.CommandButton30.Visible = False 'Wk6 copy week 2
Sheet2.CommandButton31.Visible = False 'Wk6 copy week 3
Sheet2.CommandButton32.Visible = False 'Wk6 copy week 4
Sheet2.CommandButton33.Visible = False 'Wk6 copy week 5
'no split copy weeks buttons
Sheet2.CommandButton35.Visible = True 'Wk2 copy week 1 NS
Sheet2.CommandButton36.Visible = True 'Wk3 copy week 1 NS
Sheet2.CommandButton37.Visible = True 'Wk3 copy week 2 NS
Sheet2.CommandButton38.Visible = True 'Wk4 copy week 1 NS
Sheet2.CommandButton39.Visible = True 'Wk4 copy week 2 NS
Sheet2.CommandButton40.Visible = True 'Wk4 copy week 3 NS
Sheet2.CommandButton41.Visible = True 'Wk5 copy week 1 NS
Sheet2.CommandButton42.Visible = True 'Wk5 copy week 2 NS
Sheet2.CommandButton43.Visible = True 'Wk5 copy week 3 NS
Sheet2.CommandButton44.Visible = True 'Wk5 copy week 4 NS
Sheet2.CommandButton45.Visible = False 'Wk6 copy week 1 NS
Sheet2.CommandButton46.Visible = False 'Wk6 copy week 2 NS
Sheet2.CommandButton47.Visible = False 'Wk6 copy week 3 NS
Sheet2.CommandButton48.Visible = False 'Wk6 copy week 4 NS
Sheet2.CommandButton49.Visible = False 'Wk6 copy week 5 NS
'copy day segment buttons
Sheet2.CommandButton1.Visible = True 'copy Mon 1
Sheet2.CommandButton2.Visible = False 'copy Mon 2
Sheet2.CommandButton3.Visible = False 'copy Mon 3
Sheet2.CommandButton4.Visible = True 'copy Tue 1
Sheet2.CommandButton5.Visible = False 'copy Tue 2
Sheet2.CommandButton6.Visible = False 'copy Tue 3
Sheet2.CommandButton7.Visible = True 'copy Wed 1
Sheet2.CommandButton8.Visible = False 'copy Wed 2
Sheet2.CommandButton9.Visible = False 'copy Wed 3
Sheet2.CommandButton10.Visible = True 'copy Thu 1
Sheet2.CommandButton11.Visible = False 'copy Thu 2
Sheet2.CommandButton12.Visible = False 'copy Thu 3
Sheet2.CommandButton13.Visible = True 'copy Fri 1
Sheet2.CommandButton14.Visible = False 'copy Fri 2
Sheet2.CommandButton15.Visible = False 'copy Fri 3
Sheet2.CommandButton16.Visible = True 'copy Sat 1
Sheet2.CommandButton17.Visible = False 'copy Sat 2
Sheet2.CommandButton18.Visible = False 'copy Sat 3
'6 wk rotation
Else
If Sheet1.ComboBox5 = "6" Then
Sheet1.Range("B5").Copy
Sheet2.Activate
Sheet2.Range("B4").PasteSpecial xlPasteValues
Sheet2.Columns("G:Z").EntireColumn.Hidden = False
'split copy weeks buttons
Sheet2.CommandButton19.Visible = False 'Wk2 copy week 1
Sheet2.CommandButton20.Visible = False 'Wk3 copy week 1
Sheet2.CommandButton21.Visible = False 'Wk3 copy week 2
Sheet2.CommandButton22.Visible = False 'Wk4 copy week 1
Sheet2.CommandButton23.Visible = False 'Wk4 copy week 2
Sheet2.CommandButton24.Visible = False 'Wk4 copy week 3
Sheet2.CommandButton25.Visible = False 'Wk5 copy week 1
Sheet2.CommandButton26.Visible = False 'Wk5 copy week 2
Sheet2.CommandButton27.Visible = False 'Wk5 copy week 3
Sheet2.CommandButton28.Visible = False 'Wk5 copy week 4
Sheet2.CommandButton29.Visible = False 'Wk6 copy week 1
Sheet2.CommandButton30.Visible = False 'Wk6 copy week 2
Sheet2.CommandButton31.Visible = False 'Wk6 copy week 3
Sheet2.CommandButton32.Visible = False 'Wk6 copy week 4
Sheet2.CommandButton33.Visible = False 'Wk6 copy week 5
'no split copy weeks buttons
Sheet2.CommandButton35.Visible = True 'Wk2 copy week 1 NS
Sheet2.CommandButton36.Visible = True 'Wk3 copy week 1 NS
Sheet2.CommandButton37.Visible = True 'Wk3 copy week 2 NS
Sheet2.CommandButton38.Visible = True 'Wk4 copy week 1 NS
Sheet2.CommandButton39.Visible = True 'Wk4 copy week 2 NS
Sheet2.CommandButton40.Visible = True 'Wk4 copy week 3 NS
Sheet2.CommandButton41.Visible = True 'Wk5 copy week 1 NS
Sheet2.CommandButton42.Visible = True 'Wk5 copy week 2 NS
Sheet2.CommandButton43.Visible = True 'Wk5 copy week 3 NS
Sheet2.CommandButton44.Visible = True 'Wk5 copy week 4 NS
Sheet2.CommandButton45.Visible = True 'Wk6 copy week 1 NS
Sheet2.CommandButton46.Visible = True 'Wk6 copy week 2 NS
Sheet2.CommandButton47.Visible = True 'Wk6 copy week 3 NS
Sheet2.CommandButton48.Visible = True 'Wk6 copy week 4 NS
Sheet2.CommandButton49.Visible = True 'Wk6 copy week 5 NS
'copy day segment buttons
Sheet2.CommandButton1.Visible = True 'copy Mon 1
Sheet2.CommandButton2.Visible = False 'copy Mon 2
Sheet2.CommandButton3.Visible = False 'copy Mon 3
Sheet2.CommandButton4.Visible = True 'copy Tue 1
Sheet2.CommandButton5.Visible = False 'copy Tue 2
Sheet2.CommandButton6.Visible = False 'copy Tue 3
Sheet2.CommandButton7.Visible = True 'copy Wed 1
Sheet2.CommandButton8.Visible = False 'copy Wed 2
Sheet2.CommandButton9.Visible = False 'copy Wed 3
Sheet2.CommandButton10.Visible = True 'copy Thu 1
Sheet2.CommandButton11.Visible = False 'copy Thu 2
Sheet2.CommandButton12.Visible = False 'copy Thu 3
Sheet2.CommandButton13.Visible = True 'copy Fri 1
Sheet2.CommandButton14.Visible = False 'copy Fri 2
Sheet2.CommandButton15.Visible = False 'copy Fri 3
Sheet2.CommandButton16.Visible = True 'copy Sat 1
Sheet2.CommandButton17.Visible = False 'copy Sat 2
Sheet2.CommandButton18.Visible = False 'copy Sat 3
End If
End If
End If
End If
End If
End If
End If
End If
Application.ScreenUpdating = True
Where have I gone wrong please?
Attachments
Last edited by a moderator: