It really sounds like you are getting some sort of interference going on somewhere, that is affecting workbook performance.
- How big is your workbook?
- Where exactly is this workbook you are running this against, as related to the computer you are running it from? Is your workbook stored locally on your computer?
- Are you 100% sure that there is no other VBA code anywhere in this workbook (take a look at EVERY module, including the Sheet modules, in the VB Editor)?
the overall workbook is pretty big, about 89megs. The sheet runs locally off my desktop. I have a lot of other VBA code in this workbook, but none that automatically run (i.e. change, selectionchange). All code has to be triggered manually from a button. The only other code that would affect this sheet is this below
Sub Tuesday_Class_Sizer()
If Range("A1").Value = "0" Then
Sheets("Tuesday").Unprotect Password:="123"
Rows("1:750").EntireRow.Hidden = False
Rows("750").EntireRow.Hidden = False
Rows("1:748").EntireRow.Hidden = True
ElseIf Range("A1").Value = "1" Then
Sheets("Tuesday").Unprotect Password:="123"
Rows("1:750").EntireRow.Hidden = False
Rows("2:32").EntireRow.Hidden = False
Rows("33:750").EntireRow.Hidden = True
ElseIf Range("A1").Value = "2" Then
Sheets("Tuesday").Unprotect Password:="123"
Rows("1:750").EntireRow.Hidden = False
Rows("2:63").EntireRow.Hidden = False
Rows("64:750").EntireRow.Hidden = True
ElseIf Range("A1").Value = "3" Then
Sheets("Tuesday").Unprotect Password:="123"
Rows("1:750").EntireRow.Hidden = False
Rows("2:94").EntireRow.Hidden = False
Rows("95:750").EntireRow.Hidden = True
ElseIf Range("A1").Value = "4" Then
Sheets("Tuesday").Unprotect Password:="123"
Rows("1:750").EntireRow.Hidden = False
Rows("2:125").EntireRow.Hidden = False
Rows("126:750").EntireRow.Hidden = True
ElseIf Range("A1").Value = "5" Then
Sheets("Tuesday").Unprotect Password:="123"
Rows("1:750").EntireRow.Hidden = False
Rows("2:156").EntireRow.Hidden = False
Rows("157:750").EntireRow.Hidden = True
ElseIf Range("A1").Value = "6" Then
Sheets("Tuesday").Unprotect Password:="123"
Rows("1:750").EntireRow.Hidden = False
Rows("2:187").EntireRow.Hidden = False
Rows("188:750").EntireRow.Hidden = True
ElseIf Range("A1").Value = "7" Then
Sheets("Tuesday").Unprotect Password:="123"
Rows("1:750").EntireRow.Hidden = False
Rows("2:218").EntireRow.Hidden = False
Rows("219:750").EntireRow.Hidden = True
ElseIf Range("A1").Value = "8" Then
Sheets("Tuesday").Unprotect Password:="123"
Rows("1:750").EntireRow.Hidden = False
Rows("2:249").EntireRow.Hidden = False
Rows("250:750").EntireRow.Hidden = True
ElseIf Range("A1").Value = "9" Then
Sheets("Tuesday").Unprotect Password:="123"
Rows("1:750").EntireRow.Hidden = False
Rows("2:280").EntireRow.Hidden = False
Rows("281:750").EntireRow.Hidden = True
ElseIf Range("A1").Value = "10" Then
Sheets("Tuesday").Unprotect Password:="123"
Rows("1:750").EntireRow.Hidden = False
Rows("2:311").EntireRow.Hidden = False
Rows("312:750").EntireRow.Hidden = True
ElseIf Range("A1").Value = "11" Then
Sheets("Tuesday").Unprotect Password:="123"
Rows("1:750").EntireRow.Hidden = False
Rows("2:342").EntireRow.Hidden = False
Rows("343:750").EntireRow.Hidden = True
ElseIf Range("A1").Value = "12" Then
Sheets("Tuesday").Unprotect Password:="123"
Rows("1:750").EntireRow.Hidden = False
Rows("2:373").EntireRow.Hidden = False
Rows("374:750").EntireRow.Hidden = True
ElseIf Range("A1").Value = "13" Then
Sheets("Tuesday").Unprotect Password:="123"
Rows("1:750").EntireRow.Hidden = False
Rows("2:404").EntireRow.Hidden = False
Rows("405:750").EntireRow.Hidden = True
ElseIf Range("A1").Value = "14" Then
Sheets("Tuesday").Unprotect Password:="123"
Rows("1:750").EntireRow.Hidden = False
Rows("2:435").EntireRow.Hidden = False
Rows("436:750").EntireRow.Hidden = True
ElseIf Range("A1").Value = "15" Then
Sheets("Tuesday").Unprotect Password:="123"
Rows("1:750").EntireRow.Hidden = False
Rows("2:466").EntireRow.Hidden = False
Rows("467:750").EntireRow.Hidden = True
ElseIf Range("A1").Value = "16" Then
Sheets("Tuesday").Unprotect Password:="123"
Rows("1:750").EntireRow.Hidden = False
Rows("2:497").EntireRow.Hidden = False
Rows("498:750").EntireRow.Hidden = True
ElseIf Range("A1").Value = "17" Then
Sheets("Tuesday").Unprotect Password:="123"
Rows("1:750").EntireRow.Hidden = False
Rows("2:528").EntireRow.Hidden = False
Rows("529:750").EntireRow.Hidden = True
ElseIf Range("A1").Value = "18" Then
Sheets("Tuesday").Unprotect Password:="123"
Rows("1:750").EntireRow.Hidden = False
Rows("2:559").EntireRow.Hidden = False
Rows("560:750").EntireRow.Hidden = True
ElseIf Range("A1").Value = "19" Then
Sheets("Tuesday").Unprotect Password:="123"
Rows("1:750").EntireRow.Hidden = False
Rows("2:590").EntireRow.Hidden = False
Rows("591:750").EntireRow.Hidden = True
ElseIf Range("A1").Value = "20" Then
Sheets("Tuesday").Unprotect Password:="123"
Rows("1:750").EntireRow.Hidden = False
Rows("2:621").EntireRow.Hidden = False
Rows("622:750").EntireRow.Hidden = True
ElseIf Range("A1").Value = "21" Then
Sheets("Tuesday").Unprotect Password:="123"
Rows("1:750").EntireRow.Hidden = False
Rows("2:652").EntireRow.Hidden = False
Rows("653:750").EntireRow.Hidden = True
ElseIf Range("A1").Value = "22" Then
Sheets("Tuesday").Unprotect Password:="123"
Rows("1:750").EntireRow.Hidden = False
Rows("2:683").EntireRow.Hidden = False
Rows("684:750").EntireRow.Hidden = True
ElseIf Range("A1").Value = "23" Then
Sheets("Tuesday").Unprotect Password:="123"
Rows("1:750").EntireRow.Hidden = False
Rows("2:714").EntireRow.Hidden = False
Rows("715:750").EntireRow.Hidden = True
ElseIf Range("A1").Value = "24" Then
Sheets("Tuesday").Unprotect Password:="123"
Rows("1:750").EntireRow.Hidden = False
Rows("2:745").EntireRow.Hidden = False
Rows("750").EntireRow.Hidden = True
End If
Sheets("Tuesday").Protect Password:="123"
End Sub