Sunday, June 17, 2012

Cara Menggunakan CommonDialog Printer

Private Sub Command1_Click()
Dim BeginPage, EndPage, NumCopies, i
On Error GoTo ErrHandler
With CommonDialog1
.CancelError = True
.ShowPrinter
BeginPage = .FromPage
EndPage = .ToPage
NumCopies = .Copies
End With

For i = 1 To NumCopies
'simpan kode di sini
Next i
Exit Sub
ErrHandler:
Exit Sub
End Sub