Tried both of the previous posts. Didn't work. The "Code" one didn't clear the Intermediate
window but also caused the running VBA program to reset back to programming level as well.
The first solution as I mentioned in the original report didn't work unless there wa
s a "Stop" command between the "SendKeys" line and the "Debug.Print" command.
My solution was to put a "Stop" command into my "Debug_Print" routine. Then when I pressed
the "Jump back to the calling program" key, I ended up at the line after the call in th
e calling program.
Sub Debug_Print(Message, _
Optional Short_Comment = "")
' IF Trace() Then clears the INTERMEDIATE Pane priot to _
displaying "Message" and "Short_Comment""'.
' 12/10/17 Created. Mac Lingo
Prog = "Debug_Print"
If Trace() Then
Application.SendKeys "^g ^a {DEL}"
Stop
If Short_Comment <> "" Then
Debug.Print Short_Comment
Debug.Print "===========================================" & _
"==================="
End If
Debug.Print Chr(10) & Message
Debug.Print "===========================================" & _
"==================="
End If
Bookmarks