Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem encountered with Debug.Print message being passed to subroutine
I have developed a DebugSupport class that gives the option of directing Debug.Print output to Immediate Window or Immediate Window and disk file or disk file only. This class has a method output_line. So, in my code I replace
Debug.Print "Line: " & "Test stuff" with Public dp as New DebugSupport dp.output_line ("Line: " & "Test stuff") This works fine. However if the Debug.Print message contains formatting functions such as Tab() or Spc(), then I get a compile error i.e. dp.output_line ("Line: "; Tab(10); "Test stuff") Compile error So, my question is how do I pass such a message into a subroutine. The method output_line does two things. It puts the input argument into a Debug.Print statement and then prints it to disk. I assume that the Tab() function is specific to Debug.Print and that I would have to supply some code to replicate this formatting control while printing to disk. That is not difficult. But I am stumped by the compile error. Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Bypass error message to debug | Excel Programming | |||
Can't get length of a variant array passed to a subroutine | Excel Programming | |||
Error Message: NULL IDispatch passed to Autowrap() | Excel Discussion (Misc queries) | |||
VBA causing "Excel has encountered a problem" message | Excel Programming | |||
Problem encountered | Setting up and Configuration of Excel |