i need help with printing the labels of a form but nothing else can anyone help :confused:
Printable View
i need help with printing the labels of a form but nothing else can anyone help :confused:
Labels as in standard VB labels?
How many labels?
How to you want them to appear on your printed report?
there are 6 standard labels 3 with the names of the items in the other 3 and would like them columed
Ok. Here is how you would print one labelNow, in order to print all 6 at the same time you would need to do some looping. How would do that looping depends on whether or not they are in a control array. Are they?VB Code:
Private Sub Command1_Click() Printer.Print Label1.Caption Printer.EndDoc End Sub
they are not in an array
Try thisIt will at least get you started.VB Code:
Private Sub Command1_Click() Dim ctrl As Control For Each ctrl In Me.Controls If TypeOf ctrl Is Label Then Printer.Print ctrl.Caption End If Next Printer.EndDoc End Sub