Sub Check_改ページ()
Dim i As Integer, AllP As Integer
Dim St As String
With ActiveSheet.HPageBreaks
If .Count = 0 Then Exit Sub
For i = 1 To .Count
St = St & .Item(i).Location.Row & "行" & vbLf
Next i
End With
AllP = Application.ExecuteExcel4Macro("Get.Document(50)")
MsgBox "総ページ数 = " & AllP & vbLf & St
End Sub