H o la:
No, cómo crees que me voy a molestar, no es ninguna molestia.
Este es tu código
Private Sub cmbInsertar_Click()
Dim LastRow
If TextBox7 = "" Or TextBox8 = "" Or TextBox9 = "" Or TextBox10 = "" Then
MsgBox ("Debes completar los datos necesarios en las cajas CAnt., #Productos, Descripcion o # de Página para poder continuar"), _
vbOKOnly + vbInformation, " Datos incompletos"
Else
Range("C8" & LastRow + 1).Value = TextBox1.Value
Range("F8" & LastRow + 1).Value = TextBox2.Value
Range("D9" & LastRow + 1).Value = TextBox3.Value
Range("F9" & LastRow + 1).Value = TextBox4.Value
Range("H9" & LastRow + 1).Value = TextBox5.Value
Range("J9" & LastRow + 1).Value = TextBox6.Value
LastRow = Range("C150" & Rows.Count).End(xlUp).Row 'un limite porque de 102 no pasa
Range("B" & LastRow + 1).Value = TextBox7.Value
Range("C" & LastRow + 1).Value = TextBox8.Value
Range("D" & LastRow + 1).Value = TextBox9.Value
Range("J" & LastRow + 1).Value = TextBox10.Value
End If
TextBox1 = "": TextBox2 = "": TextBox3 = "": TextBox4 = "": TextBox5 = "": _
TextBox6 = "": TextBox7 = "": TextBox8 = "": TextBox9 = "": TextBox10 = ""
End Sub
Quedaría así:
Private Sub cmbInsertar_Click()
Dim LastRow
'
If TextBox7 = "" Or TextBox8 = "" Or TextBox9 = "" Or TextBox10 = "" Then
MsgBox ("Debes completar los datos necesarios en las cajas CAnt., #Productos, Descripcion o # de Página para poder continuar"), _
vbOKOnly + vbInformation, " Datos incompletos"
Else
'
Range("C8").Value = TextBox1.Value
Range("F8").Value = TextBox2.Value
Range("D9").Value = TextBox3.Value
Range("F9").Value = TextBox4.Value
Range("H9").Value = TextBox5.Value
Range("J9").Value = TextBox6.Value
'
LastRow = Range("C" & Rows.Count).End(xlUp).Row 'un limite porque de 102 no pasa
Range("B" & LastRow + 1).Value = TextBox7.Value
Range("C" & LastRow + 1).Value = TextBox8.Value
Range("D" & LastRow + 1).Value = TextBox9.Value
Range("J" & LastRow + 1).Value = TextBox10.Value
End If
'
TextBox1 = "": TextBox2 = "": TextBox3 = "": TextBox4 = "": TextBox5 = "": _
TextBox6 = "": TextBox7 = "": TextBox8 = "": TextBox9 = "": TextBox10 = ""
End Subs a l u d o s