Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using BV6 I wish to print the cont

Status
Not open for further replies.

shalet

Programmer
Nov 22, 2003
6
0
0
GB
Using BV6 I wish to print the contents of and array of text boxes, plus a few additionl words etc.
From my lap top with XP Home, all works fine.
Using the same programme on my PC at work, using Windows 98, some variables and some strings just do not appear.
After stopping at a break point to check the variables, they look exactly as they should, but they just don't print.
e.g.
FOR a = 0 to 4
message = "Price No " & a & " £" & txtInfo(a).Text
Printer.Print message
Next a

This might print out as....

Price No 0 £112.55
Price No 1
Price No.2 £44.00
£33.99

The print-out is always the same, the missing parts do not change.
There seems no reason for this.
It's not the printer, as the lap top taken to work is fine.

any ideas?
 
Have you tried just changing Printer.Print to Debug.Print to verify that the latter behaves OK?
 
Also, is it possible that txtInfo(a).Text may contain special characters that might affect the printer e.g. CR, LF, TAB etc. In debug mode, check the value of len(txtInfo(a).Text) in each case to see if this corresponds exactly to the number of characters you anticipate. If text displays as "£33.99" but len function returns, say, 8 - this suggests 2 rogue characters as you would expect len to be 6.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top