Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default Need to read number of PrintTitleRows currently set

From my Immediate WIndow I get:
? ActiveSheet.PageSetup.PrintTitleRows
$1:$4

How can I get the integer 4 ?
TIA,
Jim


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default Need to read number of PrintTitleRows currently set

Actually, I need the number of rows currently set;
I tried
? ActiveSheet.PageSetup.PrintTitleRows.Rows.count
but no luck.
so if it were $3:$8 _ need 6
TIA,
Jim

"Jim May" wrote in message
news:wpFme.21201$Fv.10134@lakeread01...
From my Immediate WIndow I get:
? ActiveSheet.PageSetup.PrintTitleRows
$1:$4

How can I get the integer 4 ?
TIA,
Jim




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Need to read number of PrintTitleRows currently set

?Range(ActiveSheet.PageSetup.PrintTitleRows).Rows. Count
4

--

Vasant

"Jim May" wrote in message
news:wpFme.21201$Fv.10134@lakeread01...
From my Immediate WIndow I get:
? ActiveSheet.PageSetup.PrintTitleRows
$1:$4

How can I get the integer 4 ?
TIA,
Jim




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Need to read number of PrintTitleRows currently set

Hello Jim,

' RowsToRepeat() Function
' Oct 11, 2000 - Jim Cone - San Francisco, USA
' Returns the first row, last row or number of rows in
' "Rows to repeat at top" in"Page Setup".

'-------------------------------------------------------------------
Function RowsToRepeat(ByVal RowRequest As String) As Long
On Error GoTo ThatsAll
Dim TopRow As Long
Dim MidPoint As Long
Dim BottomRow As Long
Dim TitleString As String

TitleString = ActiveSheet.PageSetup.PrintTitleRows
If Len(TitleString) = 0 Then Exit Function 'RowsToRepeat will = 0
TitleString = WorksheetFunction.Substitute(TitleString, "$", vbNullString)
TopRow = Val(TitleString)
MidPoint = InStr(1, TitleString, ":", vbTextCompare)
BottomRow = Val(Mid$(TitleString, MidPoint + 1, 99))

Select Case RowRequest
Case "LastRow"
RowsToRepeat = BottomRow
Case "FirstRow"
RowsToRepeat = TopRow
Case Else
RowsToRepeat = BottomRow - TopRow + 1
End Select

Exit Function
ThatsAll:
Beep
RowsToRepeat = 0
End Function
'------------------------------


"Jim May" wrote in message
news:wpFme.21201$Fv.10134@lakeread01...
From my Immediate WIndow I get:
? ActiveSheet.PageSetup.PrintTitleRows
$1:$4
How can I get the integer 4 ?
TIA,
Jim


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default Need to read number of PrintTitleRows currently set

Thanks Vasant, much appreciated.

"Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in message
...
?Range(ActiveSheet.PageSetup.PrintTitleRows).Rows. Count
4

--

Vasant

"Jim May" wrote in message
news:wpFme.21201$Fv.10134@lakeread01...
From my Immediate WIndow I get:
? ActiveSheet.PageSetup.PrintTitleRows
$1:$4

How can I get the integer 4 ?
TIA,
Jim






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
See a number, read a date Lionel H Excel Discussion (Misc queries) 2 October 1st 07 02:06 PM
.PrintTitleRows Dr. M Excel Discussion (Misc queries) 2 June 7th 05 11:43 PM
Can PrintTitleRows method be restricted to a region instead of the whole worksheet ? Oscar Excel Programming 0 May 23rd 05 10:01 PM
how high is my PrintTitleRows hans[_3_] Excel Programming 1 November 22nd 04 10:55 AM
PrintTitleRows David Ponzio Excel Programming 2 October 9th 03 09:42 PM


All times are GMT +1. The time now is 10:14 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"