Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.excel.programming > #110765

Re: Problem encountered with Debug.Print message being passed to subroutine

From GS <gs@v.invalid>
Newsgroups microsoft.public.excel.programming
Subject Re: Problem encountered with Debug.Print message being passed to subroutine
Date 2018-11-06 19:59 -0500
Organization A noiseless patient Spider
Message-ID <prtddt$9cs$1@dont-email.me> (permalink)
References <52c4334c-8976-4d56-922b-0c845329de7d@googlegroups.com>

Show all headers | View raw


> 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

Try constructing the entire string BEFORE passing to your routine so it's 
already the output string formatted as desired, ..perhaps!

-- 
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
  comp.lang.basic.visual.misc
  microsoft.public.vb.general.discussion

Back to microsoft.public.excel.programming | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Problem encountered with Debug.Print message being passed to subroutine Desmond Walsh <deasmhuinbreathnach@gmail.com> - 2018-11-06 13:43 -0800
  Re: Problem encountered with Debug.Print message being passed to subroutine GS <gs@v.invalid> - 2018-11-06 19:59 -0500
    Re: Problem encountered with Debug.Print message being passed to subroutine Desmond Walsh <deasmhuinbreathnach@gmail.com> - 2018-11-06 22:53 -0800
      Re: Problem encountered with Debug.Print message being passed to subroutine GS <gs@v.invalid> - 2018-11-07 12:57 -0500
        Re: Problem encountered with Debug.Print message being passed to subroutine GS <gs@v.invalid> - 2018-11-07 12:59 -0500
          Re: Problem encountered with Debug.Print message being passed to subroutine Desmond Walsh <deasmhuinbreathnach@gmail.com> - 2018-11-07 10:40 -0800
            Re: Problem encountered with Debug.Print message being passed to subroutine GS <gs@v.invalid> - 2018-11-07 16:14 -0500
              Re: Problem encountered with Debug.Print message being passed to subroutine GS <gs@v.invalid> - 2018-11-07 16:54 -0500
                Re: Problem encountered with Debug.Print message being passed to subroutine Desmond Walsh <deasmhuinbreathnach@gmail.com> - 2018-11-11 20:23 -0800
  Re: Problem encountered with Debug.Print message being passed to subroutine Desmond Walsh <deasmhuinbreathnach@gmail.com> - 2018-11-11 21:09 -0800
    Re: Problem encountered with Debug.Print message being passed to subroutine GS <gs@v.invalid> - 2018-11-12 18:10 -0500
      Re: Problem encountered with Debug.Print message being passed to subroutine Desmond Walsh <deasmhuinbreathnach@gmail.com> - 2018-11-13 22:36 -0800
        Re: Problem encountered with Debug.Print message being passed to subroutine GS <gs@v.invalid> - 2018-11-14 20:31 -0500

csiph-web