Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I need urgently to find last row and last column for 1st page in printing using VBA. In my case when I print this worksheet it consist multiple pages. The problem now I need to know for page one (1st page) what is the last row and also column. Could someone here can help. Please... |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Nov 12, 2:32*am, geniusideas wrote:
Hi, I need urgently to find last row and last column for 1st page in printing using VBA. In my case when I print this worksheet it consist multiple pages. The problem now I need to know for page one (1st page) what is the last row and also column. Could someone here can help. Please... See: http://groups.google.com/group/micro...3df557cae2a8d2 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Nov 12, 6:12*am, James Ravenswood
wrote: On Nov 12, 2:32*am, geniusideas wrote: Hi, I need urgently to find last row and last column for 1st page in printing using VBA. In my case when I print this worksheet it consist multiple pages. The problem now I need to know for page one (1st page) what is the last row and also column. Could someone here can help. Please... See: http://groups.google.com/group/micro...rogramming/bro... You need a way for excel to help you find it such as a key word or row number. Send your file with a complete explanation and before/after examples to dguillett1 @gmail.com |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear Sir,
I just want to know how many rows and columns in 1st page of printing? That it.. How to count rows and column in HpageBreaks or VPageBreaks for page 1 only.. Thanks anyway.. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you guys.. Finally I found the answer as below..
Sub FndFirstPageRowAndColumn() Dim Col As Integer Dim LstCol As Integer Dim LstColPg Dim LstRowPg LstColPg = ActiveSheet.VPageBreaks(1).Location.Column - 1 LstRowPg = ActiveSheet.HPageBreaks(1).Location.Row - 1 MsgBox "Column" & "= " & LstColPg & Chr(10) & "Row" & "= " & LstRowPg End Sub Thanks anyway.. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Guys..
I Found the answer as below.. Sub FndFirstPageRowAndColumn() Dim iHBreaks As Integer, iVBreaks As Integer Dim LstColPg Dim LstRowPg iHBreaks = ActiveSheet.HPageBreaks.Count + 1 iVBreaks = ActiveSheet.VPageBreaks.Count If iVBreaks 1 Then LstColPg = ActiveSheet.VPageBreaks(1).Location.Column - 1 Else LstColPg = ActiveCell.SpecialCells(xlCellTypeLastCell).Column End If If iHpBreaks 1 Then LstRowPg = ActiveSheet.HPageBreaks(1).Location.Row - 1 Else LstRowPg = ActiveCell.SpecialCells(xlCellTypeLastCell).Row End If MsgBox "Column" & "= " & LstColPg & Chr(10) & "Row" & "= " & LstRowPg End Sub Thanks anyways.. |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
via Google I saw this link
http://www.mrexcel.com/archive/VBA/19134.html Looks very clever, not sure I understand it but could be a starting point Jim "geniusideas" wrote in message ... Hi, I need urgently to find last row and last column for 1st page in printing using VBA. In my case when I print this worksheet it consist multiple pages. The problem now I need to know for page one (1st page) what is the last row and also column. Could someone here can help. Please... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
find last row value in column when using MATCH to find column | Excel Worksheet Functions | |||
Find something in column a then find if column B matches criteria | Excel Discussion (Misc queries) | |||
Print a long 2 page column list, on one page | Excel Discussion (Misc queries) | |||
Find First Non blank cell than find column header and return that value | Excel Worksheet Functions | |||
Find specific column titles and copy the column to new workboo | Excel Programming |