Hi all,
why got this error message when run the program??
anyone help is much appreciated.
Line 28 error.
why got this error message when run the program??
anyone help is much appreciated.
Line 28 error.
Code:
Private Sub Prn2_Click()
Dim RRow2 As Integer
Dim Colomn2 As Integer
DataGrid1.Row = 0
DataGrid1.Col = Colomn2
For Colomn2 = 0 To DataGrid1.Columns.Count - 1
DataGrid1.Col = Colomn2
Debug.Print DataGrid1.Text
Next
RRow2 = 0
Colomn2 = 0
DataGrid1.Col = Colomn2
DataGrid1.Row = RRow2
If MsgBox(" Print to all?", vbOKCancel, "Print") = vbCancel Then
Exit Sub
End If
For RRow2 = 0 To rs2.RecordCount - 1
For Colomn2 = 0 To DataGrid1.Columns.Count - 1
DataGrid1.Col = Colomn2
Next
Text2.Text = DataGrid1.Text 'this line got error
LabelFormat2
rs2.MoveNext
Next
Printer.EndDoc
End Sub
Code:
Public Sub LabelFormat2()
Printer.Print "{D0391,0919,0360|}"
Printer.Print "{C|}"
Printer.Print "{D0391,0919,0360|}"
Printer.Print "{AX;+000,+000,+00|}"
Printer.Print "{AY;+00,0|}"
Printer.Print "{PC000;0136,0162,20,25,K,00,B|}"
Printer.Print "{RC00;" & Text2.Text & "|}"
Printer.Print "{XB00;0210,0200,A,3,03,0,0144,+0000000000,000,0,00|}"
Printer.Print "{RB00;>5>8>6" & Text2.Text & "|}"
Printer.Print "{XS;I,0001,0002C6200|}"
Printer.EndDoc
End Sub
Comment