×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Setting page breaks within VBA for Excel

Setting page breaks within VBA for Excel

Setting page breaks within VBA for Excel

(OP)
I am trying to set a horizontal page break within a large VBA program (more than 100 pages of macros). The code I am using is:

Cells(x,1).Select
ActiveWindow.SelectedSheets.HPageBreaks.Add Before:= ActiveCell

This does not work in my Excel program, but if I run the page break macro on another Excel workbook, it seems to run OK.

I must be doing something wrong, but I haven't got a clue as to what it is.

I will greatly appreciate any feedback on this issue.

I am running Excel 97 on a PC running Windows XT. (I will be changing to the most recent version of Excel. This raises a separate question of available literature on differences between VBA for Excel 97 and VBA for the latest version of Excel.

Zaydy

RE: Setting page breaks within VBA for Excel

I am having the same problem. I went to www.tek-tips.com and found thread68-805148. (Advanced Search page break then open the first thread which then links to the thread I have noted). I have not tried it yet but good luck to you.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources