Results 1 to 17 of 17

VBA expression to insert pagebreak

Threaded View

  1. #1
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    VBA expression to insert pagebreak

    I need to learn VBA syntax.
    I have the following line of code and its not working.

    Here's what I need to do.
    I have a list of row numbers in AA2:AA6, so for i =1 to 5
    I want to insert a page break before cell (column AA and Row(#in cell AA2-5))


    ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=Range("AA" & Range("AA" & i + 1).Value)
    Thanks for help in advance.
    modytrane
    Last edited by modytrane; 10-30-2008 at 10:26 AM. Reason: Added code tags as per forum rules

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1