Results 1 to 6 of 6

userform search button not working

Threaded View

  1. #1
    Registered User
    Join Date
    09-15-2020
    Location
    thimphu
    MS-Off Ver
    ms office 16
    Posts
    2

    Post userform search button not working

    I used the following code to search data in my userform. I want to populate the data in rest of the textboxes by filling data in one of the textboxes. However the code doesnt run and gives ( runtime error "13" type mismatch)

    Private Sub TextBox6_Change()
    Dim sh As Worksheet
    Set sh = ThisWorkbook.Sheets("S_in")
    
    Dim i As Integer
    i = Application.Match(Me.TextBox6.Value, sh.Range("B:B"), 0)
    Me.TextBox6.Value = sh.Range("B" & i).Value
    Me.TextBox1.Value = sh.Range("C" & i).Value
    Me.TextBox2.Value = sh.Range("D" & i).Value
    Me.TextBox3.Value = sh.Range("E" & i).Value
    Me.TextBox4.Value = sh.Range("F" & i).Value
    Me.ComboBox1.Value = sh.Range("G" & i).Value
    Me.TextBox5.Value = sh.Range("I" & i).Value
    i would appreciate if someone could help me with this
    Last edited by davesexcel; 09-15-2020 at 10:39 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] VBA UserForm Search Button
    By pumashoes in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-03-2021, 03:54 PM
  2. Userform Search Button and number manipulation.
    By Ph0enix in forum Excel General
    Replies: 1
    Last Post: 05-25-2015, 05:00 AM
  3. [SOLVED] userform search button remove search only when i type
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-08-2014, 02:32 AM
  4. [SOLVED] userform search code not working
    By vickyp in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-16-2013, 02:33 PM
  5. [SOLVED] Search button on an USERFORM
    By alopecito in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-25-2012, 09:34 AM
  6. [SOLVED] Search button in userform
    By Ray316 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-07-2011, 09:10 AM
  7. Search Button On Userform
    By markrennolds in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-03-2010, 04:06 PM

Tags for this Thread

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