Problème d'impression au format PDF
a
Bonjour j'ai télécharger grille loto pour pouvoir imprimer des plaques de 3 cartons mais impossible d'imprimer qui peut m'aider d'avance merci beaucoup
Option Explicit
DefBool Y
Public YStop As Boolean
Public ZI%
Sub PrintCarte(Nb%, NQ%)
Dim i%, k%, iR&, Arr, ArrPC, SAd$
[A1].Activate
'Application.ScreenUpdating = False
ArrPC = "B6:J8 B11:J13 B16:J18 L6:T8 L11:T13 L16:T18"
For i = 0 To NQ - 1
WsImp.Range("NoC") = SpcNum(Nb + i) ' + (i * 6))
For k = 0 To 5
iR = RowOfGrd(6 * ([NoC] - 1) + k + 1)
Arr = WsG.Range(WsG.Cells(iR, 1), WsG.Cells(iR + 2, 9)).Value
SAd = Split(ArrPC)(k)
WsImp.Range(SAd) = Arr
Next
If Not YStop Then PrintAsPdf
DoEvents
Next
End Sub
Function RowOfGrd&(i&) 'Position dans la WsC
i = i - [iNoC]
RowOfGrd = 3 * (i - 1) + 1
End Function
Function SpcNum(i%)
SpcNum = i + [iNoC] 'N/A dans cette version
End Function
Sub PrintAsPdf()
Dim S$ 'xlQualityMinimum / xlQualityStandard+
WsImp.PageSetup.PrintArea = IIf(ZI = 6, "$B$5:$T$18", "$B$5:$T$18") 'J
WsImp.PageSetup.Orientation = IIf(ZI = 6, xlLandscape, xlPortrait)
WsImp.PageSetup.Zoom = IIf(ZI = 6, False, 140)
S = Range("NoC").Text
WsImp.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"D:\LOTOPDF\" & S & ".pdf", Quality:=xlQualityMinimum, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
End Sub
Sub ShowUsf() '1 PDF = 100 Ko : 2000 = 200 Mo
usfImp.Show
End Sub
Sub Galopin(i&)
Dim k&
ActiveWindow.ScrollRow = 20
ActiveSheet.Shapes("CGrid").Left = ActiveWindow.Width / 2 - 160
ActiveSheet.Shapes("CGrid").Top = [A40].Top
k = RowOfGrd(i)
ActiveSheet.Shapes("CGrid").DrawingObject.Formula = "Grilles!$a$" & k & ":$I$" & k + 2
End SubBonjour,
Que fais-tu ?
Tu as posé le même post sur le post de Past : https://forum.excel-pratique.com/excel/insertion-des-donnees-dans-un-feuille-excel-198160, post auquel j'ai réagit d'aiilleurs
Vas y faire un tour
A+
bonjour Jacky, abrahim,
pouvez-vous télécharger le fichier sans données confidentielles ?