Print directly from vba spacing issues

B

Bill

I've figured out my printing errors - now can anyone help
with spacing? I have the following piece of code...

Dim intfile As Integer
intfile = FreeFile()

Open "LPT1" For Output As #intfile
Print #intfile, Chr(10)
Print #intfile, Chr(10)
Print #intfile, Chr(10)
Print #intfile, Chr(10)
Print #intfile, Chr(10)
Print #intfile, Chr(13)
Print #intfile, Chr(15); Spc(39); "9999-999"; Spc(18);
shipdate
Print #intfile, Chr(10)
Print #intfile, Chr(15); Spc(18); billname
Print #intfile, Chr(15); Spc(18); billatt
Print #intfile, Chr(15); Spc(18); billstreet; Spc(60);
custpo
Close #intfile

my problem is if a variable size changes (billstreet for
example) the location of the variable following changes
(custpo). Is there any way to keep the starting points
the same for all variables on the same line?

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top