![]() |
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 |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 03:58 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com