confusedbrat Level: Sage
 Registered: 29-08-2005 Posts: 64
|
print format
ppl i got one more question...
I use this code to print the listview box but then it does not print in a line columnwise ( items do not align one below the other). It prints like this
ab bc cd
abc cde fgh
cd de fg
iwant to allign them
Can you please help me with giving the column number to start each item in the list so that in comes in a line or is there any other way of doing it?
Private Sub Command13_Click()
Dim i As Integer
Dim i2 As Integer
Dim ItemChecked As Boolean
ItemChecked = False
Printer.Print Space(30) & "Supplier Code" & Space(6) & "Plant code" & Space(6) & "Family Name" & Space(6) & "Week of" & Space(6) & "Capacity" & Space(6) & "Gross req" & Space(6) & "Percentage"
Printer.Print vbNewLine
For i = 1 To ListView1.ListItems.Count
Printer.Print Space(35) & ListView1.ListItems(i).Text & Space(15) & ListView1.ListItems(i).ListSubItems(1).Text & Space(15) & ListView1.ListItems(i).ListSubItems(2).Text & Space(10) & ListView1.ListItems(i).ListSubItems(3).Text & Space(10) & ListView1.ListItems(i).ListSubItems(4).Text & Space(10) & ListView1.ListItems(i).ListSubItems(5).Text & Space(10) & ListView1.ListItems(i).ListSubItems(6).Text
Next i
Printer.EndDoc
End Sub
Thanks
Brat
|