Tengo un control de inventario y llego un momento que en el apartado de "salida de material me lanza el error 1004" ustedes me podrían ayudar por favor para saber cual es generador del error
PRIMERA PARTE
SEGUNDA PARTE
TERCERA PARTE
CUARTA PARTE LA DEL ERROR
código
Private Sub CommandButton1_Click()
Dim i As Integer
Dim final As Integer
Dim j As Integer
Dim actual As Double
For i = 1 To 1000
If Hoja3.Cells(i, 1) = "" Then
final = i
Exit For
End If
Next
Hoja3.Cells(final, 1) = UserForm3.ComboBox1
Hoja3.Cells(final, 2) = UserForm3.TextBox1
Hoja3.Cells(final, 3) = UserForm3.TextBox3
Hoja3.Cells(final, 4) = UserForm3.TextBox5
Hoja3.Cells(final, 5) = UserForm3.TextBox6
Hoja3.Cells(final, 6) = UserForm3.TextBox7
For j = 1 To 1000
If Hoja6.Cells(j, 1) = Hoja3.Cells(final, 1) Then
actual = Hoja6.Cells(j, 3)
final = actual - UserForm3.TextBox3
Hoja6.Cells(j, 3) = final
Exit For
End If
Next
UserForm3.ComboBox1 = ""
UserForm3.TextBox1 = ""
UserForm3.TextBox2 = ""
UserForm3.TextBox3 = 0
UserForm3.TextBox4 = ""
UserForm3.TextBox5 = ""
UserForm3.TextBox6 = ""
UserForm3.TextBox7 = ""
UserForm21.Hide
UserForm3.Hide
End Sub
Private Sub CommandButton2_Click()
UserForm21.Hide
End Sub