+ Reply to Thread
Results 1 to 5 of 5

On each HPageBreak put border

  1. #1
    Registered User
    Join Date
    06-12-2019
    Location
    Zagreb
    MS-Off Ver
    2013
    Posts
    3

    On each HPageBreak put border

    I have sheet with few thousand rows and I need put border on each end of page of PrintArea
    (there is also other formating but not important for this question).
    Macro code is in excel file loaded from XLSTART and Oracle Forms software (via WebUtil) which generate a worksheet with data.

    So when excel sheet has been wrote, webutil fire a macro (which is loaded by excel start) and it format a sheet.
    I have solution with "for each cell" but when code is executed automatically, it detect HPageBreak, but first HPB miss for +2 rows
    then next for +4 rows, +6 rows, and so on.

    If I start manually macro, it work just fine.

    Where I have problem, I'm unable to figure out what cause problem or I miss something?


    Code I use:

    Please Login or Register  to view this content.

  2. #2
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: On each HPageBreak put border

    I believe pagebreaks are just in between two pages, not after each page.

  3. #3
    Registered User
    Join Date
    06-12-2019
    Location
    Zagreb
    MS-Off Ver
    2013
    Posts
    3

    Re: On each HPageBreak put border

    there is no question where HPageBreak exist. The question is why is such a behavior?

  4. #4
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,519

    Re: On each HPageBreak put border

    Sounds like 2 header rows repeated at every page.

  5. #5
    Registered User
    Join Date
    06-12-2019
    Location
    Zagreb
    MS-Off Ver
    2013
    Posts
    3

    Re: On each HPageBreak put border

    You are almost right and your post let me find where problem exist.
    When in same code I have page setup, set print area and HPageBreak find, pagebreak are set automatically, but without count a place for header&footer top and bottom margin.
    those two values are add at end of macro execution. So this explain why my macro work good when I start it manually after page is already formated.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 03-29-2011, 08:22 AM
  2. Locating HPageBreak and adding to counter
    By farzyness in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-04-2010, 08:18 AM
  3. HPagebreak
    By gonzalex in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-05-2006, 05:05 AM
  4. [SOLVED] HPageBreak Row
    By Oscar in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-05-2006, 04:10 AM
  5. [SOLVED] VBA & HPageBreak
    By myname in forum Excel General
    Replies: 1
    Last Post: 10-15-2005, 01:05 PM
  6. hpagebreak and vpagebreak
    By btm in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-05-2005, 09:05 AM
  7. need help with hpagebreak
    By btm in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-05-2005, 09:05 AM

Tags for this Thread

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