Saludos Profesor Sergio, de ante mano gracias por responder, realice lo que me sugirió coloque el código donde me indicó, sin embargo me sigue arrojando el mismo error.
' Restaurar formato de fuente
With wsHistorico.Rows("2:2").Font
.ColorIndex = xlAutomatic
.TintAndShade = 0
End With
' Incrementar automáticamente el número de recibo
wsRecibo.Range("J2").Value = wsRecibo.Range("J2").Value + 1
'Corrección de Error en impresión
Application.Wait (Now + TimeValue("0:00:01"))
' Imprimir
wsRecibo.PrintOut Copies:=1, Collate:=True, IgnorePrintAreas:=False
Por
dorgelis, · publicado
Buenas tardes Estimados ..por favor me pueden ayudar con error que me aparace cuando presiono el boton grabar
Private Sub CommandButton1_Click()
On Error Resume Next
Sheets("compras").Select
ULinea = Range("a" & Rows.Count).End(xlUp).Row + 1 'llevar desde formulario a planilla excel'
Range("A" & ULinea).Value = Me.TextBox5.Text
Range("B" & ULinea).Value = Me.TextBox4.Text
Range("C" & ULinea).Value = Me.TextBox18.Text
Range("D" & ULinea).Value = Me.TextBox2.Text
Range("E" & ULinea).Value = Me.TextBox8.Text
Range("F" & ULinea).Value = Me.TextBox9.Text
Range("G" & ULinea).Value = Me.TextBox10.Text
Range("H" & ULinea).Value = Me.TextBox6.Text
Range("I" & ULinea).Value = Me.TextBox7.Text
Range("J" & ULinea).Value = Me.ComboBox1.Value ' los textbox tienen extencion Txt'
Me.TextBox2.Text = ""
Me.TextBox3.Text = ""
Me.TextBox5.Text = ""
Me.TextBox6.Text = ""
Me.TextBox7.Text = ""
Me.TextBox8.Text = ""
Me.ComboBox1.Value = ""
TextBox2.SetFocus ' EL SetFocus devuelve el cursor al inicio´'
End Sub