CommonDialog + ShowPrinter
Lenouveauapprenti
Messages postés
306
Date d'inscription
Statut
Membre
Dernière intervention
-
Lenouveauapprenti Messages postés 306 Date d'inscription Statut Membre Dernière intervention -
Lenouveauapprenti Messages postés 306 Date d'inscription Statut Membre Dernière intervention -
Bonjour
Comment pourrai je gérer les boutons d'une boite de dialogue pour impression en VB6 ?
Pour tester ma boite de dialogue, j'ai écris ce code :
mais apparemment, la propriété True ( ou pour être bien précis, la condition de départ n'est pas reconnue, qu'elle soit true ou false) n'est pas reconnue par cette procédure.
Toute aide est la bienvenue avec toute ma reconnaissance
Comment pourrai je gérer les boutons d'une boite de dialogue pour impression en VB6 ?
Pour tester ma boite de dialogue, j'ai écris ce code :
With CmnDialog
If CmnDialog.CancelError = True Then
MsgBox "Bonsoir"
'GoTo NoImp:
Exit Sub
Else
MsgBox "Bonjour"
'GoTo OkImp:
Exit Sub
End If
End With
mais apparemment, la propriété True ( ou pour être bien précis, la condition de départ n'est pas reconnue, qu'elle soit true ou false) n'est pas reconnue par cette procédure.
Toute aide est la bienvenue avec toute ma reconnaissance
1 réponse
Re Bonjour
J'ai essayé un autre code sans résultat escompté
Je vous demande de m'indiquer mes erreurs, Merci d'avance
'______________________________Impression
J'ai essayé un autre code sans résultat escompté
Je vous demande de m'indiquer mes erreurs, Merci d'avance
'______________________________Impression
Dim NDebut, NFin As Integer
Dim NbreNumCopies, ICopies As Integer
On Error GoTo xxx:
CmnDialog.ShowPrinter
NDebut = CmnDialog.FromPage
NFin = CmnDialog.ToPage
NbreNumCopies = CmnDialog.Copies
SQLs = "select * from TableGrandLivre where ((Dossier='" & CStr(VarDossier) & "')and (Compte=" & CLng(CmbCompte) & "))" & "order by NOrdreGl asc"
If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic
ADGL.RecordSource = SQLs
Set DRGrandLivre.DataSource = ADGL
ADGL.Refresh
DRGrandLivre.Sections("Section4").Controls("LDossier").Caption = VarDossier
DRGrandLivre.Sections("Section4").Controls("LDateDebut").Caption = VarDateD
DRGrandLivre.Sections("Section4").Controls("LDateFinale").Caption = VarDateF
DRGrandLivre.Sections("Section4").Controls("LblDate").Caption = DateAN
DRGrandLivre.Sections("Section4").Controls("LblJournal").Caption = NomR
DRGrandLivre.Sections("Section4").Controls("LTitre").Caption = CmbCompte & " " & LblCompte
DRGrandLivre.Sections("Section4").Controls("LblSoldeInitial").Caption = Format(SoldeAN, "#,##0.00")
DRGrandLivre.Sections("Section5").Controls("LblDebitG").Caption = Format(SommeD, "#,##0.00")
DRGrandLivre.Sections("Section5").Controls("LblCreditG").Caption = Format(SommeC, "#,##0.00")
DRGrandLivre.Sections("Section5").Controls("LblSoldeG").Caption = Format(SoldeG, "#,##0.00")
DRGrandLivre.Show
DRGrandLivre.WindowState = 2
'DRGrandLivre.PrintReport False, rptRangeAllPages
For ICopies = 1 To NbreNumCopies
Next ICopies
Exit Sub
xxx:
Exit Sub