打印在Excel中使用VBA相反的顺序页面
下面的宏可用于以相反的顺序打印工作表的页面。
Sub PrintInReverseOrder() Dim TotalPages As Long, p As Long TotalPages = (ActiveSheet.HPageBreaks.Count + 1) * _ (ActiveSheet.VPageBreaks.Count + 1) For p = TotalPages To 1 Step -1 'ActiveSheet.PrintOut p, p Debug.Print "Printing page " & p & " of " & TotalPages Next p End Sub