Print directly from vba spacing issues

  • Thread starter Thread starter Bill
  • Start date Start date
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.
 
Back
Top