julien974
XLDnaute Occasionnel
Bonjour,
J'ai ce code pour avoir un apercu avant impression. Quand je le lance, il rame une disaine de secondes avant de l'afficher.
avez vous comment racourcir ce temps d'affichage, merci
Ci dessous le code
Merci,
Julien974
J'ai ce code pour avoir un apercu avant impression. Quand je le lance, il rame une disaine de secondes avant de l'afficher.
avez vous comment racourcir ce temps d'affichage, merci
Ci dessous le code
PHP:
Private Sub CommandButton1_Click()
Worksheets("Hoja1").Range("A1").Value = UserForm1.TextBox1.Text
Worksheets("Hoja1").Range("A2").Value = UserForm1.TextBox2.Text
UserForm1.Hide
Unload UserForm1
Sheets("HOJA DE IMPRECION").PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftHeader = Sheets("Hoja1").Range("A2").Value
.CenterHeader = Sheets("Hoja1").Range("A1").Value
.RightHeader = "&D"
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.78740157480315)
.RightMargin = Application.InchesToPoints(0.78740157480315)
.TopMargin = Application.InchesToPoints(0.984251968503937)
.BottomMargin = Application.InchesToPoints(0.984251968503937)
.HeaderMargin = Application.InchesToPoints(0)
.FooterMargin = Application.InchesToPoints(0)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 600
.CenterHorizontally = True
.CenterVertically = True
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperA4
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
.PrintErrors = xlPrintErrorsDisplayed
End With
ActiveWindow.SelectedSheets.PrintPreview
End Sub
Merci,
Julien974