|
-
May 8th, 2002, 07:06 PM
#1
Thread Starter
Member
using a print function in visual basics
hi, im having some real trouble getting my program to print my source code,
here is the code im using
Private Sub Print_Click()
Dim BeginPage, EndPage, NumCopies, i
' Set Cancel to True
CommonDialog1.CancelError = True
On Error GoTo ErrHandler
' Display the Print dialog box
CommonDialog1.ShowPrinter
' Get user-selected values from the dialog box
BeginPage = CommonDialog1.FromPage
EndPage = CommonDialog1.ToPage
NumCopies = CommonDialog1.Copies
For i = 1 To NumCopies
' Put code here to send data to the printer
Next i
Exit Sub
ErrHandler:
' User pressed the Cancel button
Exit Sub
End Sub
I have a commondialog box, i found out how to print the form, but I can not find out how to print my source code, if any of you could help, it would be greatly appriated
thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|