Hi guys, Im new programming in VBA and I have a doubt. I create a macro to set the printing format that I need in all my files but I cant set the title rows. I could set just one row but I need two rows (variables E and F)
This is what I did,
Dim E As Integer
Dim F As Integer
E = ActiveCell.Row
F = E + 1
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.PrintTitleRows = ActiveSheet.Rows(E).Address
.PrintTitleColumns = ""
End With
Application.PrintCommunication = True
ActiveSheet.PageSetup.PrintArea = Range("A1", Cells(A, B)).Address
In this case I could set only a tittle row (E) but I need to set the two rows (E and F), dont know how to modify this code, can you please help me? it can be so difficult
Thanks a lot
Bookmarks