Results 1 to 2 of 2

Search Button - Finds Part Numbers with numbers, letters and characters

Threaded View

Kyhosa Search Button - Finds Part... 01-13-2021, 12:02 PM
AlphaFrog Re: Search Button - Finds... 01-13-2021, 12:28 PM
  1. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: Search Button - Finds Part Numbers with numbers, letters and characters

    Use the Find Method for a text search.

    Private Sub SearchCB_Click()
        Dim Res As Long
        Dim Found As Range
        
        Set Found = Sheets("RI PN Info").Range("A:A").Find(What:=PartNoTB.Value, _
                                                           LookIn:=xlValues, _
                                                           LookAt:=xlPart, _
                                                           SearchOrder:=xlByRows, _
                                                           SearchDirection:=xlNext, _
                                                           MatchCase:=False)
        
        If Not Found Is Nothing Then
            Res = Found.Row
            SDescriptionTB.Value = Sheets("RI PN Info").Range("C" & Res).Value
            LDescriptionTB.Value = Sheets("RI PN Info").Range("D" & Res).Value
            CustomerTB.Value = Sheets("RI PN Info").Range("E" & Res).Value
            RevTB.Value = Sheets("RI PN Info").Range("F" & Res).Value
            RICodeTB.Value = Sheets("RI PN Info").Range("G" & Res).Value
    NOTE: If the user types in an asterisk (*) in the textbox, that is considered a wild card and will match any characters.
    Last edited by AlphaFrog; 01-13-2021 at 12:38 PM.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 11
    Last Post: 12-01-2017, 12:47 PM
  2. [SOLVED] Setup Textbox to enter only numbers and letters, not especial characters
    By eddyrcabrera79 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-04-2015, 11:52 AM
  3. Selecting letters/characters/numbers separately for a filter
    By WasWodge in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-08-2014, 09:12 PM
  4. Replies: 1
    Last Post: 02-01-2013, 06:30 PM
  5. [SOLVED] Making a Part# List, Sequential Increments with Letters and numbers in front...
    By kpl39 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-31-2012, 08:29 PM
  6. Replies: 4
    Last Post: 08-06-2012, 11:52 AM
  7. Count specific characters with numbers or letters
    By hoppscrouse in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-19-2007, 09:02 AM

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