Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default pagenumber of active cell (vba)

Ralf,

This would work if you don't have vertical page breaks..

Private Sub CommandButton1_Click()
Dim obj As Object
Dim intRow As Integer
Dim i As Integer
intRow = ActiveCell.Row
i = 1
For Each obj In ActiveSheet.HPageBreaks
If obj.Location.Row intRow Then
MsgBox i & " is the current page number."
Exit Sub
End If
i = i + 1
Next
End Sub

Hope that helps.

-Brad

-----Original Message-----
Hi,

how can i get the pagenumber of the selected cell?

thanks for any help
Ralf
merry christmas from germany!


.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Row select mode to highlight active row of active cell Bart Fay[_2_] Excel Discussion (Misc queries) 0 May 11th 10 09:34 PM
set the background color of the current cell(active cell) kang New Users to Excel 2 July 31st 07 04:48 PM
referring to formula in a non active cell from active cell nickname Excel Discussion (Misc queries) 1 June 21st 07 12:11 PM
HOW TO COPY 480 ACTIVE E-MAIL ADDRESSES CLM "G" ON AN ACTIVE EXCE. ragman10 Excel Discussion (Misc queries) 1 December 13th 04 11:52 PM
pagenumber hans[_2_] Excel Programming 1 November 17th 03 03:00 PM


All times are GMT +1. The time now is 06:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"