ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Printing Problem (https://www.excelbanter.com/excel-programming/362353-printing-problem.html)

Chaplain Doug

Printing Problem
 
Excel 2003. I am using the following code (attached to a button on a user
form) to print the contents of a text box on the user form. When it is sent
to my printer it always makes the printer think that it needs COM10
envelopes. I just want it to go to plain paper, which is the default for the
printer. What can I do to make it work? Thanks.

Dim PrinterName As String, I As Integer
On Error GoTo Err_PS
I = InStr(Application.ActivePrinter, " on ")
PrinterName = Mid(Application.ActivePrinter, 1, I - 1)
Open PrinterName For Output As #1
Print #1, ProcessStatus.ProcStat.Text
Exit_PS:
Close #1
Exit Sub
Err_PS:
Call MsgBox("Error printing status window. Please contact system
administrator.", vbOKOnly, "Print Error")
ProcessStatus.PrintStatus.Enabled = False
Goto Exit_PS
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org


All times are GMT +1. The time now is 09:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com