|
-
Nov 15th, 2022, 02:09 PM
#14
Re: Redirect where Debug.Print goes.
 Originally Posted by Elroy
It'd be nice if I could figure out how to redirect where Debug.Print goes.
I've got a little persistent DebugPrint program I often use. It's easy to use, as I just remove the dot from my Debug.Print statements. However, it'd be even more cool if I could just redirect everything.
At first, I created an auto-instantiating class named "Debug". That worked just fine.
However, there are still two problems:
1) This class still doesn't override the internal Debug object.
2) "Print" is a reserved word and can't be used as a procedure name.
So drat. Any ideas?
The problem is not Print, the problem is Debug.
You cannot normally use 'Debug' as the name of a procedure because it is a reserved keyword.
You could name a class Debug, but that does not serve for the purpose.
You'll need to edit the VBA6.DLL and change where 'Debug' is written in the reserved keywords list with something else, for example DxBxg.
I have done it, if you want the DLL, I can send it to you privately.
About the Print method, it is not a problem.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|