Hi All :-)
I am getting an error in my code and have no clue what is wrong?? It was working before and now I am getting this :
Run time error 91
Object variable or With block variable not set
This is the whole code:
Private Sub CommandButton1_Click()
If Me.ComboBox1.ListIndex < 0 Then Exit Sub
With MyRange.Cells(1).Offset(ComboBox1.ListIndex)
.Offset(, 0).Value = ComboBox1.Value
.Offset(, 21).Value = TextBox1.Value
.Offset(, 19).Value = TextBox2.Value
.Offset(, 20).Value = TextBox3.Value
.Offset(, 25).Value = TextBox4.Value
.Offset(, 22).Value = ComboBox29.Value
.Offset(, 23).Value = TextBox32.Value
End With
Unload Me
MsgBox "Record Updated"
UserForm1.Show
End Sub
Thanks for help
Dan
Bookmarks