Tuesday, November 08, 2005

Adding PageBreak in Excel using VBA

To add page Break by using Visualbasic for Application in Excel using following code

ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=Cells(R,W)

where
R - Row & C-Column

the page break will be added to Activewindows selected sheet before the specific Cell

Cheers
Renugopal D