dame et roi
XLDnaute Occasionnel
Bonsoir à tous,
Je bloque sur un problème. Je souhaite remplacer "AD213" dans toutes les lignes ci dessous du code, par la valeur de la cellule B1 de la feuille "zone" par exemple associé à AD . AD+(valeur de la cellule B1).
Range("a1:AD213").Select
ActiveSheet.PageSetup.PrintArea = "$a$1:$AD$213"
Range("a1").Select
With ActiveSheet.PageSetup
.PrintTitleRows = "$5:$6"
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = "$a$1:$AD$213"
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.196850393700787)
.RightMargin = Application.InchesToPoints(0.196850393700787)
.TopMargin = Application.InchesToPoints(0.275590551181102)
.BottomMargin = Application.InchesToPoints(0.275590551181102)
.HeaderMargin = Application.InchesToPoints(0.196850393700787)
.FooterMargin = Application.InchesToPoints(0.196850393700787)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = -3
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperA4
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
End With
ActiveWindow.SelectedSheets.PrintOut Copies:=1
Pouvez vous m'aider svp et l'écrire en code vba pour excel 2003.
Merci par avance.
a bientôt
Je bloque sur un problème. Je souhaite remplacer "AD213" dans toutes les lignes ci dessous du code, par la valeur de la cellule B1 de la feuille "zone" par exemple associé à AD . AD+(valeur de la cellule B1).
Range("a1:AD213").Select
ActiveSheet.PageSetup.PrintArea = "$a$1:$AD$213"
Range("a1").Select
With ActiveSheet.PageSetup
.PrintTitleRows = "$5:$6"
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = "$a$1:$AD$213"
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.196850393700787)
.RightMargin = Application.InchesToPoints(0.196850393700787)
.TopMargin = Application.InchesToPoints(0.275590551181102)
.BottomMargin = Application.InchesToPoints(0.275590551181102)
.HeaderMargin = Application.InchesToPoints(0.196850393700787)
.FooterMargin = Application.InchesToPoints(0.196850393700787)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = -3
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperA4
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
End With
ActiveWindow.SelectedSheets.PrintOut Copies:=1
Pouvez vous m'aider svp et l'écrire en code vba pour excel 2003.
Merci par avance.
a bientôt