'自动设置行高 传入工作表Sht 和 每页打印的行数RowsInOnePage Public Sub AutoSetRowHeight(ByVal Sht As Worksheet, Optional RowsInOnePage As Variant) Dim BreakRow As Range '水平分页符位置 Dim SumHeight As Double '累计首页行高 Dim AverageHeight As Double Dim i As Long '行号 With Sht '获取第一