Tenta assim:
Private Sub btnimprimir_Click()
On Error Resume Next
Dim i As Long
Dim Resposta As String
Worksheets("PlanPrint").Activate
Range("A8:C3000").ClearContents
If Me.lstv.ListItems.Count <= 0 Then
Me.btnimprimir.Enabled = False
Else
Me.btnimprimir.Enabled = True
If MsgBox("Confirma a impressão?", vbQuestion + vbYesNo, "Confirmação") = vbYes Then
'Exporta dados para a PlanPrint
For i = 1 To Me.lstv.ListItems.Count
With PlanPrint.Range("a65000").End(xlUp)
.Offset(1, 0) = Format(lstv.ListItems(i), "0") ' Codigo
.Offset(1, 1) = lstv.ListItems(i).ListSubItems(1) ' SERVIÇO
.Offset(1, 2) = lstv.ListItems(i).ListSubItems(2) 'SITUAÇÃO
End With
Next
With PlanPrint
Resposta = Application.Dialogs(xlDialogPrinterSetup).Show
If Resposta = True Then
ActiveWindow.SelectedSheets.PrintOut Copies:=1
End If
End With
End If
End If
End Sub
Postado : 25/10/2012 10:17 am