Option Explicit Private Sub Hide_Speed_Data_Sheet() Dim FirstLine As Long Dim LastLine As Long Hide_Data "Speed Data", "Speed Graph", FirstLine, LastLine End Sub Private Sub Hide_VANOS_Data_Sheet() Dim FirstLine As Long Dim LastLine As Long Hide_Data "VANOS Data", "Exhaust VANOS Chart", FirstLine, LastLine Hide_Data "VANOS Data", "Inlet VANOS Chart", FirstLine, LastLine End Sub Private Sub Hide_Temperatures_Data_Sheet() Dim FirstLine As Long Dim LastLine As Long Hide_Data "Temperatures Data", "Temperatures Chart", FirstLine, LastLine End Sub Private Sub Hide_Air_Flow_Data_Sheet() Dim FirstLine As Long Dim LastLine As Long Hide_Data "Air Flow Data", "Air Flow Chart", FirstLine, LastLine End Sub Private Sub Hide_Shut_Off_Cyl_Data_Sheet() Dim FirstLine As Long Dim LastLine As Long Hide_Data "Shut-Off Cyl Data", "Shut-Off Cyl Chart", FirstLine, LastLine End Sub Private Sub Hide_Ignition_Data_Sheet() Dim FirstLine As Long Dim LastLine As Long Hide_Data "Ignition Data", "Ignition Angle Chart", FirstLine, LastLine Hide_Data "Ignition Data", "Injection Time Chart", FirstLine, LastLine End Sub Private Sub Hide_Data(DataSheetName As String, GraphName As String, StartRow As Long, FinishRow As Long) ' ' Macro1 Macro ' Dim StartRow_Main As Long Dim FinishRow_Main As Long ' Unhide ALL rows Sheets(Sheets(Sheets.Count).Name).Select StartRow_Main = Range("A1").Value FinishRow_Main = Range("A2").Value Sheets(DataSheetName).Select If StartRow_Main = 0 Then MsgBox "Run the macro 'Prepare Data' and try again." Exit Sub End If Rows(StartRow_Main & ":" & FinishRow_Main).EntireRow.Hidden = False ' Hide rows above selection Sheets(DataSheetName).Select If StartRow = 0 Then StartRow = Range("C1").Value If StartRow < 4 Then MsgBox "Start Row must be 4 or greater" Exit Sub ElseIf StartRow = 4 Then ' Do nothing Else Rows("4:" & (StartRow - 1)).EntireRow.Hidden = True End If ' Hide rows below selection Sheets(DataSheetName).Select If FinishRow = 0 Then FinishRow = Range("C2").Value If FinishRow <= StartRow Then MsgBox "Finish Row must be greater than Start Row" Exit Sub Else Rows(FinishRow & ":" & FinishRow_Main).EntireRow.Hidden = True End If ' Select the graph Sheets(GraphName).Select End Sub