-1

I'm wondering if there is a way to print all info from, the Immediate window into a file or direct back to a specific cell?

When the code runs, it shows results in the Immediate window, but in the moment I need to copy/paste them to a cell or to another .txt file. So it would be great if I can log or print all the results after the analysis into a file (on my desktop) or just back into cells.

Paul Roub
  • 36,322
  • 27
  • 84
  • 93
159_v6
  • 11
  • 2

1 Answers1

0

I found it myself, so the problem is solved

    If UBound(XX) > 0 Then Print #n, Join(XX, ",")

Where Debug.Print was changed with Print #n

    n = FreeFile()
    Open "C:\Users\" & Environ$("username") & "\Desktop\Results.txt" For Output As #n
159_v6
  • 11
  • 2