Thread: Excel VBA Macro
View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_3_] Dave Peterson[_3_] is offline
external usenet poster
 
Posts: 2,824
Default Excel VBA Macro

Maybe you can just loop through your pagebreaks:

Dim hPB As HPageBreak
For Each hPB In ActiveSheet.HPageBreaks
'just for testing
'MsgBox hPB.Location.Address
hPB.Location.Offset(1, 0).Value = "Your Fund Variable"
Next hPB



"keith2816 <" wrote:

I have some idea but not complete cos I do not know all the codes.

I was think to insert the following macro to find the location of the
page break since my current macro will insert page break automatically
e.g.Sub Check_PageBreak()

Dim i As Integer, BreakType As Integer

BreakType = ActiveCell.EntireRow.PageBreak

If BreakType = xlAutomatic Then
?????

End if

End Sub

But i will need another code to insert the fund name at the top of the
row for each page break

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson