Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to pagebreak
Hello everyone,
My problem is that I need to automate insertion of pagebreak in an excel document. I pull data from database and spit it out on an excel sheet and then I want to write a short VB application or just a macro which insert page breaks at a particular places which i will mark on excel sheet while spitting out data. so this macro/routine should just look through an entire coulmn in excel sheet and when it found the mark it will just insert the page break automatically and replace the mark by null. I dont have enough experience in writing VBA routines. I would be very thankful if someone can guide me. Thanks a lot, Bilal |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to pagebreak
Turn on the macro recorder and insert a pagebreak. Turn it off.
That will give you the syntax for inserting a pagebreak. You can loop through your cells looking for your mark Dim cell as Range for each cell in Range(Range("A1"),Cells(rows.count,1).End(xlup)) if cell.Value = "Mark" then ' code to insert pagebreak end if Next -- Regards, Tom Ogilvy "Bilal A F" wrote in message ... Hello everyone, My problem is that I need to automate insertion of pagebreak in an excel document. I pull data from database and spit it out on an excel sheet and then I want to write a short VB application or just a macro which insert page breaks at a particular places which i will mark on excel sheet while spitting out data. so this macro/routine should just look through an entire coulmn in excel sheet and when it found the mark it will just insert the page break automatically and replace the mark by null. I dont have enough experience in writing VBA routines. I would be very thankful if someone can guide me. Thanks a lot, Bilal |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need help coding a PageBreak | Excel Discussion (Misc queries) | |||
Cant move pagebreak in PageBreak View in Excel2003 | Excel Worksheet Functions | |||
Rogue vertical pagebreak | Excel Programming | |||
PAGEBREAK-MACRO | Excel Programming | |||
how to set excel pagebreak in programm | Excel Programming |