iKolPage = ExecuteExcel4Macro("GET.DOCUMENT(50)")
MsgBox iKolPage
или (Актуально для MS Excel 97, 2000, XP):
iHPageBr = ActiveSheet.HPageBreaks.Count + 1
iVPageBr = ActiveSheet.VPageBreaks.Count + 1
iKolPage = iHPageBr * iVPageBr
MsgBox iKolPage
iKolPage = ExecuteExcel4Macro("GET.DOCUMENT(50)")
MsgBox iKolPage
или (Актуально для MS Excel 97, 2000, XP):
iHPageBr = ActiveSheet.HPageBreaks.Count + 1
iVPageBr = ActiveSheet.VPageBreaks.Count + 1
iKolPage = iHPageBr * iVPageBr
MsgBox iKolPage