Results 1 to 8 of 8

search with input box

Threaded View

ccsmith search with input box 11-17-2012, 12:25 PM
HSV Re: search with input box 11-17-2012, 12:39 PM
ccsmith Re: search with input box 11-17-2012, 12:54 PM
HSV Re: search with input box 11-17-2012, 01:03 PM
ccsmith Re: search with input box 11-17-2012, 01:33 PM
vipul.halbe Re: search with input box 11-17-2012, 01:09 PM
HSV Re: search with input box 11-17-2012, 01:56 PM
ccsmith Re: search with input box 11-18-2012, 05:51 AM
  1. #1
    Forum Contributor
    Join Date
    04-21-2010
    Location
    Budapest
    MS-Off Ver
    Excel 2010
    Posts
    155

    search with input box

    I got a code for search number in a range. I would like to use this one to add a next button (option) to this macro to find the next results as well.
    Could it be possible to highlight the entire row where the result found?


    Sub searchmain()
    Dim InputItem As Variant
    Dim c As Range
    
        InputItem = ""
        InputItem = Application.InputBox("Please enter the number you wish to find", "Number", "")
        If InputItem = "" Or InputItem = False Then Exit Sub
    
    Set c = Columns(7).Find(InputItem, LookAt:=xlWhole, MatchCase:=False)
    
        If c Is Nothing Then
        MsgBox "not found", 48, "error"
        Else
        c.Select
        End If
    
    End Sub
    Last edited by ccsmith; 11-18-2012 at 05:50 AM.

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