Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Printing List Box Contents
Hi
Is there a way in Excel (VBA Code) to print to contents of a list box? For example, I have an application that lists some financial figures in a list box. Is there a way of sending these figures to a printer? Martyn |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Printing List Box Contents
Easiest would be to write them to a worksheet and print the range where they
are written. An alternative is to use low level file io (guess it depends on what you are actually doing) 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 ine " + Str(ctrl) Print #1, tmpstr Next tmpstr = "[End of printing test]" + Chr(12) Print #1, tmpstr Close #1 End Sub If the printer is on a network, you would have to replace the LPT1 with the network name. -- Regards, Tom Ogilvy "Martyn Jones" wrote in message om... Hi Is there a way in Excel (VBA Code) to print to contents of a list box? For example, I have an application that lists some financial figures in a list box. Is there a way of sending these figures to a printer? Martyn |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Printing All the Contents of a Cell | Excel Worksheet Functions | |||
Printing all text contents of Cell | Excel Discussion (Misc queries) | |||
Printing cell contents problem | Excel Discussion (Misc queries) | |||
How do I prevent cell contents from printing? | Excel Discussion (Misc queries) | |||
Preventing cell contents from printing | Excel Discussion (Misc queries) |