Sub txtprint(Optional v1, Optional v2, Optional v3, Optional v4, Optional
v5, Optional v6)
Dim ifile As Integer
Dim sfile As String
sfile = "c:\debug.txt"
ifile = FreeFile
Open sfile For Append As #ifile
If Not IsMissing(v1) Then Print #ifile, v1;
If Not IsMissing(v2) Then Print #ifile, , v2;
If Not IsMissing(v3) Then Print #ifile, , v3;
If Not IsMissing(v4) Then Print #ifile, , v4;
If Not IsMissing(v5) Then Print #ifile, , v5;
If Not IsMissing(v6) Then Print #ifile, , v6;
Print #ifile,
Close #ifile
End Sub
That runs a lot slower than debug.print because if flushes the
file on every line. To make it run faster, take out the open
and close lines, and run them seperately.
(david)
"Deano" <de***@mailinator.com> wrote in message
news:43***********************@ptn-nntp-reader03.plus.net...
I'm just looping through some tables and printing the names to the
immediate
window. I notice that I lose the first few after the code has run. If I
step through they do get printed intially. It's about 100 tables. Is the
immediate window limited to the number of lines it can display?
thanks
Martin