Quote Originally Posted by Arkadi View Post
Hi meonly,

Try this, I have to admit I didn't test it well since my free time is limited today, but I believe this should work? You will need to adjust the sheet name in the code to the name of the sheet you are working in.
Sub meonly123()

Dim ws As Worksheet
Dim rng As Range
Dim hbr As Long
Dim vbr As Long
Dim mypage As Integer

Set rng = ActiveCell
Set ws = Worksheets("Sheet1") 'change to the sheet name you need to or use set ws = activesheet is probably better
ws.DisplayPageBreaks = True

For i = 1 To ws.HPageBreaks.Count
    If ws.HPageBreaks(i).Location.Row <= rng.Row Then hbr = i
Next i

For j = 1 To ws.VPageBreaks.Count
    If ws.VPageBreaks(j).Location.Column <= rng.Column Then vbr = j
Next j

If ws.PageSetup.Order = xlDownThenOver Then
            mypage = ((ws.HPageBreaks.Count + 1) * vbr) + hbr + 1
Else
            mypage = ((ws.VPageBreaks.Count + 1) * hbr) + vbr + 1
End If

ws.PrintOut from:=mypage, to:=mypage

End Sub
thanks for your time i am really gratefuller to you
i use active sheet instead of sheet name coz i have alot of pages
but it show error on this line :
If ws.HPageBreaks(i).Location.Row <= rng.Row Then
any idea!!!