Results 1 to 3 of 3

Highlight listbox value if textbox value found in column 2

Threaded View

  1. #1
    Forum Contributor
    Join Date
    08-04-2008
    Location
    West Calder, Scotland
    MS-Off Ver
    365
    Posts
    430

    Highlight listbox value if textbox value found in column 2

    Good evening all

    I have been messing about with this for a wee while to no avail.

    This code highlights the list value when a match is found with the textbox value, this works well,, apart from if the list value is numerical...

    What I'm looking for please is to highlight the list value if the textbox value is found in column 2..
    Your help is much appreciated

    many thanks

    JT

    Private Sub txtDelDep_Change()
    Dim n As Long
    With lstDepartment
        For n = 0 To .ListCount - 1
            If txtDelDep = .List(n) Then
                .ListIndex = n
                Exit Sub
            End If
        Next n
    .ListIndex = -1
    End With
    End Sub
    Last edited by JamesT1; 05-19-2022 at 05:26 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Highlight row if a word is found anywhere in another column
    By WaveWalker116 in forum Excel General
    Replies: 3
    Last Post: 12-28-2021, 05:01 PM
  2. [SOLVED] Highlight cells in column A if same value found in column B
    By Matlas in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-28-2020, 04:19 PM
  3. Highlight row if duplicates found with three column
    By HaroonSid in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-05-2017, 01:36 PM
  4. Replies: 2
    Last Post: 10-06-2015, 11:27 PM
  5. [SOLVED] Highlight cells in column of found text string
    By delaing in forum Excel Programming / VBA / Macros
    Replies: 27
    Last Post: 09-11-2015, 02:15 PM
  6. [SOLVED] Highlight matching string in Listbox based on Textbox value
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-26-2014, 11:04 AM
  7. Highlight column once unique ID found
    By Hnedjari in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-30-2012, 12:20 PM

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