hi Busch,
thank you for the suggestion. But i am looking forward to a code without hardcoding. I have tried already what you have suggested. But our users doesn't like it.
Quote:
Originally Posted by Claus Busch
Hi,
Am Wed, 21 Aug 2013 11:20:26 +0100 schrieb divya nila:
I want to add Page border (for four sides) around each page in the
spreadsheet of excel. My excel is having multipages in one spreadsheet
and it is having nearly 6 spreadsheets. I have used PageBreaks to
determine last row of a page but the pagebreak is 0 if i have only one
page in a spreadsheet. So i want to know how to determine the last row
of a page.
try:
Sub PageBreak()
Dim intHPB As Integer
With ActiveSheet
If .HPageBreaks.Count = 0 Then .Cells(65, 1) = "Test"
MsgBox .HPageBreaks(1).Location.Row - 1
.Cells(65, 1).Clear
End With
End Sub
Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
|