ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel VB Editor output stack and/or intermediate window to file (https://www.excelbanter.com/excel-programming/418338-excel-vbulletin-editor-output-stack-intermediate-window-file.html)

Gum

Excel VB Editor output stack and/or intermediate window to file
 
I would like to output (dump) the information in the stack and/or
intermediate window of Excel VB Editor to a disk file. How can this be done?

Jon Peltier

Excel VB Editor output stack and/or intermediate window to file
 
Instead of using Debug.Print, I have a routine called DebugPrint which
outputs the date and time plus the Debug string to a text file. I don't know
about the stack.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Gum" wrote in message
...
I would like to output (dump) the information in the stack and/or
intermediate window of Excel VB Editor to a disk file. How can this be
done?




Gum

Excel VB Editor output stack and/or intermediate window to fil
 
That would help. If I cannot get the stack, then I could get proxy data that
I can put in the same dump file.

"Jon Peltier" wrote:

Instead of using Debug.Print, I have a routine called DebugPrint which
outputs the date and time plus the Debug string to a text file. I don't know
about the stack.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Gum" wrote in message
...
I would like to output (dump) the information in the stack and/or
intermediate window of Excel VB Editor to a disk file. How can this be
done?





Jon Peltier

Excel VB Editor output stack and/or intermediate window to fil
 
Public Sub DebugPrint(sLogEntry As String)
' write debug information to a log file

Dim iFile As Integer
Dim sFileName As String

sFileName = ThisWorkbook.Path & "\debuglog" & Format$(Now, "YYMMDD") &
".txt"

iFile = FreeFile

Open sFileName For Append As iFile
Print #iFile, Now; " "; sLogEntry
Close iFile

End Sub


- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Gum" wrote in message
...
That would help. If I cannot get the stack, then I could get proxy data
that
I can put in the same dump file.

"Jon Peltier" wrote:

Instead of using Debug.Print, I have a routine called DebugPrint which
outputs the date and time plus the Debug string to a text file. I don't
know
about the stack.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Gum" wrote in message
...
I would like to output (dump) the information in the stack and/or
intermediate window of Excel VB Editor to a disk file. How can this be
done?







Gum

Excel VB Editor output stack and/or intermediate window to fil
 
Excellent!

"Jon Peltier" wrote:

Public Sub DebugPrint(sLogEntry As String)
' write debug information to a log file

Dim iFile As Integer
Dim sFileName As String

sFileName = ThisWorkbook.Path & "\debuglog" & Format$(Now, "YYMMDD") &
".txt"

iFile = FreeFile

Open sFileName For Append As iFile
Print #iFile, Now; " "; sLogEntry
Close iFile

End Sub


- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Gum" wrote in message
...
That would help. If I cannot get the stack, then I could get proxy data
that
I can put in the same dump file.

"Jon Peltier" wrote:

Instead of using Debug.Print, I have a routine called DebugPrint which
outputs the date and time plus the Debug string to a text file. I don't
know
about the stack.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Gum" wrote in message
...
I would like to output (dump) the information in the stack and/or
intermediate window of Excel VB Editor to a disk file. How can this be
done?








All times are GMT +1. The time now is 05:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com