Hi Everyone;
My current task is to create a spreadsheet that will auto-hide/show rows based upon values in other cells. I am currently about halfway 40% complete with this aspect of the file. I've read over many forums, and the best what that I've seen individuals do it on other sample spreadsheets posted were a =Rand() in a random cell somewhere in the sheet, and a Private Sub worksheet_calculate()
I'm far from a VBA expert. I'm trying to learn as I go along. Here is my current VBA:
Private Sub worksheet_calculate()
Dim Personnel As Integer, ACCT As Integer, SCOPE As Integer
Personnel = Worksheets("Creation").Range("F6:F6").Value + 12
Sheets("Creation").Rows("13:21").EntireRow.Hidden = True
Sheets("Creation").Rows("13:" & Auditors).EntireRow.Hidden = False
If Range("H6").Value <> "AMI" Then
Sheets("Creation").Rows("23:25").EntireRow.Hidden = False
Sheets("Creation").Range("B23").Value = Sheets("Creation").Range("H6").Value & " - Worksheet"
Else
Sheets("Creation").Rows("23:49").EntireRow.Hidden = True
End If
End Sub
It was only when I added the
Sheets("Creation").Range("B23").Value = Sheets("Creation").Range("H6").Value & " - Worksheet"
clause that it began to do a 5 second long update process upon any cell value changing.
I'm looking for how to set my VBA code to automatically update Hidden and unhidden fields, but without this 3 second updating calculation pause. Any help/advice?
Bookmarks