Private Sub workbook_beforeprint(cannel As Boolean)Dim k As Integera = Range("h5555").End(xlUp).RowFor k = 1 To aIf Cells(k, 8) = "" Then Rows(k & ":" & k).Select Selection.RowHeight = 4.5 End If NextEnd Sub 试试看