H o l a:
Te anexo la macro para guardar en la base de datos e imprimir.
Sub GuadarFactura()
'Por.Dante Amor
Set h1 = Sheets("FACTURA")
Set h2 = Sheets("BASE.DAT")
'
If h1.[C5] = "" Then
MsgBox "Falta el cliente", vbInformation, "ERROR DE DATOS"
Exit Sub
End If
'
u = h2.Range("A" & Rows.Count).End(xlUp).Row + 1
For i = 13 To 37
If h1.Cells(i, "B") = "" Then Exit For
h2.Cells(u, "A") = h1.[C5] 'cliente
h2.Cells(u, "B") = h1.[J6] 'fecha
h2.Cells(u, "C") = h1.[J5] 'no fact
h2.Cells(u, "D") = h1.Cells(i, "C") 'desc
h2.Cells(u, "E") = h1.Cells(i, "B") 'qty
h2.Cells(u, "F") = h1.Cells(i, "J") 'price
h2.Cells(u, "G") = h1.Cells(i, "L") 'total
u = u + 1
Next
h1.PrintOut
MsgBox "Factura impresa y guardada en la base de datos", vbInformation
End Sub
[code]‘:)
‘Saludos. Dante Amor. Recuerda valorar la respuesta.