Dim num As Integer
Dim counter As Integer
Dim counter0 As Integer
num = 0
counter0 = 0
counter = 0
For sheetfor = 1 To ThisWorkbook.Sheets.Count
For i = 1 To ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Row
If Not Sheets(sheetfor).Range("d" & i).MergeCells Then
Private Sub CommandButton1_Click() Dim pages As Long pages = ExecuteExcel4Macro("Get.Document(50)") MsgBox pagesEnd Sub取得页数,不知道你的具体需要,适当修改咯。Private Sub CommandButton1_Click() If MsgBox("该文档共计" & ExecuteExcel4Macro("Get.Document(50)") & "页,是否打印?", vbYesNo + vbExclamation, "打印提示") = vbYes Then ActiveShe...