Hi,
I have a listbox containing names of Sheets. I need to merge all those sheets into a Single sheet and save it as PDF.
I need know address of 1st Cell on the next page.
Please see below code and comment in it:
For i = 0 To lstPrintSheet.ListCount - 1
Set oFindRange = WS_Print.Cells.Find("*", SearchOrder:=xlByRows, LookIn:=xlValues, SearchDirection:=xlPrevious)
If oFindRange Is Nothing Then
pRow = 1
Else
pRow = oFindRange.Row + 1
End If
' instead of above logic, I want to assign pRow with the 1st Row on the next page.
' So suppose after pasting the contents, if my last used row in WS_Print is 255 on page# 4, I want pRow to assign to 1st row of page# 5 (So that next sheet gets pasted on next page)
ThisWorkbook.Sheets(lstPrintSheet.List(i)).UsedRange.Copy WS_Print.Range("A" & pRow)
Next
Any Expert Advice for this please?
Bookmarks