+ Reply to Thread
Results 1 to 2 of 2

Highlight Row from TextBox in Userform

Hybrid View

lsteinbach Highlight Row from TextBox in... 04-20-2013, 03:54 PM
lsteinbach Re: Highlight Row from... 04-20-2013, 05:07 PM
  1. #1
    Forum Contributor
    Join Date
    09-13-2012
    Location
    Midwest
    MS-Off Ver
    Excel 365
    Posts
    124

    Highlight Row from TextBox in Userform

    In my userform, the user enters a row number into TextBox3. I'm trying to have the entered row highlighted after the user enters it. I think this might be a TextBox3_AfterUpdate, but I'm not sure what code to use to highlight the row.
    Thank you!

    Luke

  2. #2
    Forum Contributor
    Join Date
    09-13-2012
    Location
    Midwest
    MS-Off Ver
    Excel 365
    Posts
    124

    Re: Highlight Row from TextBox in Userform

    I figured it out. It works dynamically under TextBox_Change and also by setting the color index to 0, it will still highlight the row by selecting it, then will leave it with no-fill so you don't have to code it back to no-fill.
    Private Sub TextBox3_Change()
    Dim rw As Long
    rw = TextBox3.Value
    With Sheets("Data")
    Rows(rw).EntireRow.Select
    Selection.EntireRow.Interior.ColorIndex = 0
    End With
    
    End Sub
    Thank you me!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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