Problemas con una maco de inventario al memento de ingresar una cantidad arriba de 30000
hola soy nuevo en esto y me gustaría saber si alguien me puede ayudar en la macro al momento de dar de alta en mis entradas la cantidad de 32270 me manda un error en tiempo de ejecución desbordamiento
Private Sub CommandButton1_Click()
Dim i As Integer
Dim j As Integer
Dim final As Integer
Dim actual As Integer
For i = 1 To 1000
If Hoja2.Cells(i, 1) = "" Then
final = i
Exit For
End If
Next
Hoja2.Cells(final, 1) = UserForm2.ComboBox1
Hoja2.Cells(final, 2) = UserForm2.TextBox1
Hoja2.Cells(final, 3) = UserForm2.TextBox2
Hoja2.Cells(final, 4) = UserForm2.TextBox4
Hoja2.Cells(final, 5) = UserForm2.TextBox6
Hoja2.Cells(final, 6) = UserForm2.TextBox7
For j = 1 To 1000
If Hoja6.Cells(j, 1) = Hoja2.Cells(final, 1) Then
actual = Hoja6.Cells(j, 3)
final = UserForm2.TextBox2 + actual aquí se pone en amarillo
Hoja6.Cells(j, 3) = final
Exit For
End If
Next
UserForm2.ComboBox1 = ""
UserForm2.TextBox1 = ""
UserForm2.TextBox2 = ""
UserForm2.TextBox4 = ""
UserForm2.TextBox6 = ""
UserForm2.TextBox7 = ""
UserForm2.TextBox8 = ""
UserForm15.Hide
UserForm2.Hide
End Sub
alguna ayuda por favor