+ Reply to Thread
Results 1 to 2 of 2

Search & Find Question

  1. #1
    Registered User
    Join Date
    12-29-2003
    Posts
    8

    Search & Find Question

    I have this VBA code looking in Column C for what ever I type in the InputBox and then it will go to the cell with that name.
    I cannot get it to stay in Column C.
    I have tried the Range(C:C) in several different places but nothing works.
    Thank You.



    Sub CompanySearch()
    ' CompanySearch Macro

    Range("C:C").Select
    what = InputBox("COMPANY NAME", "SEARCH")
    If what = "" Then
    MsgBox ("You must enter a contact name - Click OK to exit.")
    Range("A1").Select
    Else
    Set found = Cells.Find(what:=what, MatchCase:=False)
    If Not found Is Nothing Then
    found.Activate
    Selection.FindNext(After:=ActiveCell).Select
    Else
    MsgBox ("Not found - Click ok to exit.")
    Range("A1").Select
    End If
    End If
    End Sub

  2. #2
    Registered User
    Join Date
    12-29-2003
    Posts
    8
    Is this possible?

+ Reply to Thread

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