hi my program is need to print different forms but each forms must use different printer and all printers was connected to my pc via usb port, my problem is if i want to print a form A i will click the command box then it will use the EPSON printer, if form B use CANNON, and in form C it will use BROTHER as its default printer. Can u help me to set the dafault printer before the form will be printed. Thanks.
Dim p As VB.Printer
For Each p In VB.Printers
If p.DeviceName = "EPSON" Then
Set Printer = p
i hope that you can use the above code according to your suitability.one more thing that may help you is that use of commondialog boxe to choose the printer but i think the above code will be more suitable as we need not to select the printer again and agian whenever we want to print.