hi guys
I have this code but doesn't work at all , I try updating values in some columns based on filled values in multiple textboxes
can any body guide me where is the mistake ?
I have this code but doesn't work at all , I try updating values in some columns based on filled values in multiple textboxes
VBA Code:
Private Sub CommandButton1_Click()
Dim sh As Worksheet
Dim sr As Range
Dim cl
Set sh = Sheets("sheet1")
c1 = Me.ComboBox1.Value
If c1 <> "" Then
Set sr = ws.Columns(4).Find(c1, LookAt:=xlWhole)
If Not c1 Is Nothing Then
sh.Cells(sr.Row, "A") = Me.TextBox1.Value
sh.Cells(sr.Row, "B") = Me.TextBox2.Value
sh.Cells(sr.Row, "C") = Me.TextBox3.Value
End If
End If
End Sub