+ Reply to Thread
Results 1 to 1 of 1

vb code for receive button to substract textBox value from specific cell of sheet

  1. #1
    Registered User
    Join Date
    04-19-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    2

    vb code for receive button to substract textBox value from specific cell of sheet

    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
    Last edited by swapbhay; 04-22-2013 at 12:19 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1