Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello I have a form that inputs data into a sheet then you click a button to print 2 copies (one on a green sheet and one on a white sheet) BUT Is it poss before printing a message box to appear and ask the user to insert the "white copy" then after printing a second message box to appear asking the user to insert "Green copy" Is it also poss for a macro to control a printer and make it form feed the sheets the reason is when printing the white and green copy you have to form feed them and when you print from any other program or a different excel sheet it prints from the paper tray. I know that this is a long shot!!!! Thanks -- Rmagic ------------------------------------------------------------------------ Rmagic's Profile: http://www.excelforum.com/member.php...o&userid=28595 View this thread: http://www.excelforum.com/showthread...hreadid=486655 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can try sending a form feed character to the printer (chr(12) as I
recall) msgbox "White paper" ActiveSheet.Printout msgbox "Green paper" ActiveSheet.Printout Here is information from an old post on printing directly that you can adapt to sending a form feed (it already includes a form feed in the demo). -------------------------- Actually you don't need to create a text file. You can write to the printer, same as writing to the file: the below prints several lines, but you should be able to adapt it to your situation. Sub Macro5() Dim ctrl as Long Dim tmpstr as String Open "LPT1:" For Output As #1 Print #1, "[Start of Printing Test]" For ctrl = 1 To 10 tmpstr = "Printing:" + Str(ctrl) Print #1, tmpstr Next tmpstr = "[End of printing test]" + Chr(12) Print #1, tmpstr Close #1 End Sub To a Network printer First, I went to the immediate window in the VBE to query the activeprinter string ? activePrinter \\ARDAPS01\1D343E on Ne02: then I used the first part in the below code: Sub Macro5() Dim ctrl As Long Dim tmpstr As String Open "\\ARDAPS01\1D343E" For Output As #1 Print #1, "[Start of Printing Test]" For ctrl = 1 To 10 tmpstr = "Printing Line " + Str(ctrl) Print #1, tmpstr Next tmpstr = "[End of printing test]" + Chr(12) Print #1, tmpstr Close #1 End Sub Worked for me. --------------- -- Regards, Tom Ogilvy "Rmagic" wrote in message ... Hello I have a form that inputs data into a sheet then you click a button to print 2 copies (one on a green sheet and one on a white sheet) BUT Is it poss before printing a message box to appear and ask the user to insert the "white copy" then after printing a second message box to appear asking the user to insert "Green copy" Is it also poss for a macro to control a printer and make it form feed the sheets the reason is when printing the white and green copy you have to form feed them and when you print from any other program or a different excel sheet it prints from the paper tray. I know that this is a long shot!!!! Thanks -- Rmagic ------------------------------------------------------------------------ Rmagic's Profile: http://www.excelforum.com/member.php...o&userid=28595 View this thread: http://www.excelforum.com/showthread...hreadid=486655 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() hi Thanks for code I have tried but get a "Run time error 52" The code Sub Macro5() Dim ctrl As Long Dim tmpstr As String Open "EPSON Stylus CX3200 on Ne00:" For Output As #1 Print #1, "[Start of Printing Test]" For ctrl = 1 To 10 tmpstr = "Printing:" + Str(ctrl) Print #1, tmpstr Next tmpstr = "[End of printing test]" + Chr(12) Print #1, tmpstr Close #1 End Sub Thanks for the help -- Rmagic ------------------------------------------------------------------------ Rmagic's Profile: http://www.excelforum.com/member.php...o&userid=28595 View this thread: http://www.excelforum.com/showthread...hreadid=486655 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Notice the sample code did not have the "On Ne00"
-- Regards, Tom Ogilvy "Rmagic" wrote in message ... hi Thanks for code I have tried but get a "Run time error 52" The code Sub Macro5() Dim ctrl As Long Dim tmpstr As String Open "EPSON Stylus CX3200 on Ne00:" For Output As #1 Print #1, "[Start of Printing Test]" For ctrl = 1 To 10 tmpstr = "Printing:" + Str(ctrl) Print #1, tmpstr Next tmpstr = "[End of printing test]" + Chr(12) Print #1, tmpstr Close #1 End Sub Thanks for the help -- Rmagic ------------------------------------------------------------------------ Rmagic's Profile: http://www.excelforum.com/member.php...o&userid=28595 View this thread: http://www.excelforum.com/showthread...hreadid=486655 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Reminder message before printing | Excel Discussion (Misc queries) | |||
error message during printing | Excel Discussion (Misc queries) | |||
error message during printing | Excel Discussion (Misc queries) | |||
Printing on message box condition? | Excel Programming | |||
Deactivating Printing Message | Excel Programming |