Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a subroutine that outputs info about pivot tables and I would like the
option to either output the results to a file or to the Immediate window (Debug.Print). This is the gist of what I'm looking for: Sub (ToFile as Boolean) If ToFile Then Open "C:\PPI.log" For Output As #1 Else Open Debug.Print for output as #1 End If Print #1, "...output..." .. .. .. Yes, the ELSE line does create an error which is why I'm asking. Is there a form of redirection I can use? I'm looking for something easy, not a whole gob of IF...THEN...ELSE statements :-o TIA -- Toby Erkson Oregon, USA Excel 2003 in Windows XP |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
output to the same line in a Text file? | Excel Discussion (Misc queries) | |||
Need Help With Loop That Creates Output File | Excel Discussion (Misc queries) | |||
Excel 2003 won't let me select my own regression output range. | Excel Discussion (Misc queries) | |||
debug message pops up when I select a range of cells and delete | Excel Programming | |||
VBA help to output a file | Excel Programming |