zaydy
Electrical
- Sep 17, 2005
- 1
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
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