Search in excel.

Hi all.. im new here.. and was wondering if you can help?

im looking for some vb script for excel that will do a search.

if i explain you might understand.

sheet1 wil have a search box and button.

say i look for a contact, i enter his name click search.

then it searches sheet2 for the row with all the info.
then it displays it in a popup box in sheet one.

i have look every where i can can find and google can only search so much.

please help..


Comments

  • Hi

    Here is a hint

    Sub CommandSearch_Click()

    Search_In_Sheet2 (txtSearch.Text)


    End Sub


    Function Search_In_Sheet2(ByVal sText As String)

    Dim rFnd As Range
    Set rFnd = ActiveWorkbook.Sheets(2).Cells.Find(what:=sText, LookIn:=xlValues, lookat:=xlPart)
    If Not rFnd Is Nothing Then
    MsgBox "Found " & sText & " in Sheet 2, Row " & rFnd.Row
    End If

    End Function





    : Hi all.. im new here.. and was wondering if you can help?
    :
    : im looking for some vb script for excel that will do a search.
    :
    : if i explain you might understand.
    :
    : sheet1 wil have a search box and button.
    :
    : say i look for a contact, i enter his name click search.
    :
    : then it searches sheet2 for the row with all the info.
    : then it displays it in a popup box in sheet one.
    :
    : i have look every where i can can find and google can only search so
    : much.
    :
    : please help..
    :
    :
    :

    VBA Tips & Tricks (http://vbadud.blogspot.com)

    C# Code Snippets (http:dotnetdud.blogspot.com)
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion