macro to set printer range base on the word subtotal

  • Thread starter Thread starter sean
  • Start date Start date
S

sean

Hello everyone, I do not know if this is possible to have
a macro. I have a sheet with a series of sub total. I
would like to set my printer page range from A1 to first
sub total. And after each sub total to the end of every
sub total. I will greatly appreciate any help. thanks in
advance
 
Look in Excel VBA help at the Find Command and

ActiveSheet.HPageBreaks.Add Before:=ActiveCell

The sample code in the vba help for the Find Command shows you how to search
for multiple occurances of a search target. (at least in xl2000 and earlier
(in later versions, it is in the help for FindNext I believe).
 
Back
Top