Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 Line " & cStr(ctrl) Print #1, tmpstr Next tmpstr = "[End of printing test]" & Chr(12) Print #1, tmpstr Close #1 End Sub Worked for me. May have to change LPT1 to address your printer. You will have to workout how to address your printer. Regards, Tom Ogilvy "Terry V" wrote in message ... Hello How do I print the contents of a global variable to the default printer? Thanx Terry |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Global variable | Excel Discussion (Misc queries) | |||
Global Variable | Excel Discussion (Misc queries) | |||
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? | Excel Worksheet Functions | |||
userform variable as global | Excel Programming | |||
Global variable | Excel Programming |