Hi There,
I have made a new userform (userform4) and assigned it to sheet 8. However, the code below is giving me a runtime error 13. I have tried naming the userform4.combobox1 but still is giving me the same error. What could be the reason behind now?
Dim r As Long
With Sheet8
r = Application.Match(UserForm4.ComboBox1.Value, .Range("F:F"), False)
.Cells(r, 17).Value = TextBox2.Value
.Cells(r, 18).Value = TextBox3.Value
.Cells(r, 19).Value = TextBox4.Value
.Cells(r, 29).Value = TextBox5.Value
.Cells(r, 30).Value = TextBox6.Value
TextBox2.Value = ""
TextBox3.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
TextBox6.Value = ""
Rows(r).Select
UserForm4.ComboBox1.SetFocus
End With
'ErrHandler:
'If Err.Number = 13 Then
' MsgBox "No Data to Display on System Stock!", vbExclamation, "Update Sheet"
' End If
End Sub
I have made a new userform (userform4) and assigned it to sheet 8. However, the code below is giving me a runtime error 13. I have tried naming the userform4.combobox1 but still is giving me the same error. What could be the reason behind now?
Dim r As Long
With Sheet8
r = Application.Match(UserForm4.ComboBox1.Value, .Range("F:F"), False)
.Cells(r, 17).Value = TextBox2.Value
.Cells(r, 18).Value = TextBox3.Value
.Cells(r, 19).Value = TextBox4.Value
.Cells(r, 29).Value = TextBox5.Value
.Cells(r, 30).Value = TextBox6.Value
TextBox2.Value = ""
TextBox3.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
TextBox6.Value = ""
Rows(r).Select
UserForm4.ComboBox1.SetFocus
End With
'ErrHandler:
'If Err.Number = 13 Then
' MsgBox "No Data to Display on System Stock!", vbExclamation, "Update Sheet"
' End If
End Sub