1

I found a problem with the VBA Locals Window while debuggin a macro in Excel 2013. I used the Locals Window to track the value of a string.

If the string exceed a certain length (about 100 caracters) it is not possible to copy it out of the Locals Window to examine it somewhere else (eg. in notepad++).

Is there a way to access the full content of a string variable at runtime ?

Lorenz Meyer
  • 19,166
  • 22
  • 75
  • 121

1 Answers1

1

You can also dump the output to a txt file. "response" is the variable to output in the below example.

Dim fso As Object
Set fso = CreateObject("Scripting.FileSystemObject")
Dim oFile As Object
Set oFile = fso.CreateTextFile("C:\Development\DebugOutput.txt")
oFile.WriteLine response
oFile.Close
Set fso = Nothing
Set oFile = Nothing
ScottLenart
  • 1,160
  • 1
  • 12
  • 15