Excel 插入分页符
Sub 宏1() ' ' 宏1 宏 ' ' Rows("98:98").Select ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell ActiveWindow.SmallScroll Down:=-9 ActiveWindow.ScrollRow = 55 ActiveWindow.ScrollRow = 37 ActiveWindow.ScrollRow = 1 ActiveWindow.SmallScroll Down:=63 Rows("98:98").Select End Sub Sub 宏2() ' ' 宏2 宏 ' ' ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell ActiveWindow.SmallScroll Down:=87 Rows("195:195").Select ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell Application.Goto Reference:="宏1" Range("H195").Select ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell ActiveWindow.SelectedSheets.VPageBreaks.Add Before:=ActiveCell ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell ActiveWindow.SelectedSheets.VPageBreaks.Add Before:=ActiveCell Rows("195:195").Select ActiveWindow.View = xlPageBreakPreview ActiveWindow.SmallScroll Down:=0 Range("M204").Select ActiveWindow.SmallScroll Down:=12 Range("E226:E227").Select ActiveWindow.SmallScroll Down:=-42 Range("E171:E172").Select ActiveWindow.View = xlNormalView Application.Goto Reference:="宏2" End Sub