Experimente:
Sub imprimir()
Dim lRow As Long, lLop As Long
'MsgBox "Imprimir todos os demonstrativos ?", vbYesNo, "Alerta"
Application.ScreenUpdating = False
lRow = Sheets("Plan2").Cells(Cells.Rows.Count, "A").End(xlUp).Row
Sheets("Plan1").Activate
For lLop = 2 To lRow
Sheets("Plan1").Range("N2") = Sheets("Plan2").Cells(lLop, 1).Value
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, IgnorePrintAreas:=False
Next
Application.ScreenUpdating = True
MsgBox "Foram impressos; " & lRow - 1 & "Comprovantes"
End Sub
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 19/03/2015 12:05 pm