I Have add user form with 2 cmd button and 4 textbox
1 st btn is to search value from textbox1
and 2btn to substract value of textbox4 from specific cell of sheet 1 and overwrite result in same cell
i Try following code
Private Sub CommandButton2_Click()
Dim rFind As Range
With Sheets("Sheet1").Columns(1)
Set rFind = .Find(What:=Me.TextBox1.Value, LookAt:=xlWhole, MatchCase:=False, SearchFormat:=False)
If Not rFind Is Nothing Then
rFind.Offset(,2)-Me.TextBox4.Value
End If
End With
End Sub
but some thing went wrong
Bookmarks