Sub clear_rows()

in spreadsheet/Sheet1.vb [766:792]


Sub clear_rows()
    Dim row As Integer
    Dim emptyrow() As Variant, i As Integer
    ReDim Preserve emptyrow(1 To num_columns)
    row = row1
    For i = 1 To num_columns
        emptyrow(i) = ""
    Next i
    Do While row < row_limit And (Len(Cells(row, category_column)) + Len(Cells(row, subcategory_column)) + Len(Cells(row, text_column)) + Len(Cells(row, status_column)) + Len(Cells(row, comments_column))) > 0
        Range(Cells(row, 1), Cells(row, num_columns)).Value = emptyrow
        row = row + 1
    Loop
    
    row = 2
    Do While row < row_limit And Len(Sheets(values_sheet).Cells(row, values_category_column)) > 0
        Sheets(values_sheet).Cells(row, values_category_column) = ""
        row = row + 1
    Loop
    
    Cells(checklist_name_row, checklist_name_col) = Sheets(values_sheet).Cells(2, 5)
    
    Cells(checklist_state_row, checklist_state_col) = ""
    Cells(checklist_timestamp_row, checklist_timestamp_col) = ""
    
    Cells(technology_selection_row, technology_selection_col) = Sheets(values_sheet).Cells(2, values_technology_selection_column)
    Cells(language_selection_row, language_selection_col) = Sheets(values_sheet).Cells(2, values_language_selection_column)
End Sub