Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21909

Printing across the Page

$
0
0
Hi
I am printing a page of 21 addresses across the page in 3 columns
this would be OK if all the addresses had the same amount of lines,
but this is not true in my case the max number of lines is 7 (0 to 6) and the
min is 5 (0 to 4) so I have this code to print the first line across the page
Left-Middle-Right I start checking for blank lines at line 4 (3)
for each block I have i_0 and iHold_0 to i_2 iHold_2 as you can
see if LineCtlB(i_2) is blank it loops this works Ok but if the preceding
Var LineCtlB(i_2) is blank the printer does not move to the next line so
lLineCtlC(i_2) prints over the top of the previous line
Can you help?

Code:

VB6
iHold_2 = 3
    i_2 = 3
    For i_2 = iHold_2 To 7
      If LineCtlB(i_2) <> vbNullString Then
        PrintLine2_2 = LineCtlB(i_2)
        Printer.Print PrintLine2_2
        iHold_2 = i_2 + 1
        Exit For
      End If
    Next


Viewing all articles
Browse latest Browse all 21909

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>