Vielen Dank im voraus.
Dim VPC As Integer, HPC As Integer
Dim VPB As VPageBreak, HPB As HPageBreak
Dim NumPage As Integer
If ActiveSheet.PageSetup.Order = xlDownThenOver Then
HPC = ActiveSheet.HPageBreaks.Count + 1
VPC = 1
Else
VPC = ActiveSheet.VPageBreaks.Count + 1
HPC = 1
End If
NumPage = 1
For Each VPB In ActiveSheet.VPageBreaks
If VPB.Location.Column > ActiveCell.Column Then Exit For
NumPage = NumPage + HPC
Next VPB
For Each HPB In ActiveSheet.HPageBreaks
If HPB.Location.Row > ActiveCell.Row Then Exit For
NumPage = NumPage + VPC
Next HPB
MsgBox "Page number of the active cell = " & NumPage
MfG Frank
_____________________________________________________
Frank Arendt-Theilen, Microsoft MVP für Excel, Hameln
E-Mail: Thei...@t-online.de
Am Mon, 09 Oct 2000 21:30:40 +0200, schrieb Hüntelmann
<Agnes.Hu...@t-online.de> in microsoft.public.de.excel zu
"Seitenzahl in Zelle schreiben":
Vielen Dank Frank. Es funktioniert bestens.