Data Entry Search Via Vba

Microsoft Office 2007 professional (aca...
August 16, 2011 at 05:13:34
Specs: Windows XP, 256 mb

I have build a user form via vba in excel 2007 using instructions mentioned in the site

Nw i want to incorporate a search item that is when i enter a part number first it search in existing data
if found display another user form to enter missing information

otherwise enter the data

Is it possible if yes cn any1 plz illustrate.

Thanks in advance

See More: Data Entry Search Via Vba

Report •

August 16, 2011 at 10:50:58
The Excel 2010 Help files left out this example, but it can be found in Excel 2003 and earlier.

It's a shame that 2007 and later do not include this powerful example of how to use .Find in VBA.

Replace the instructions within the Do-Loop with the instructions that you need.

This example finds all cells in the range A1:A500 on worksheet one 
that contain the value 2 and changes it to 5.

With Worksheets(1).Range("a1:a500")
    Set c = .Find(2, lookin:=xlValues)
    If Not c Is Nothing Then
        firstAddress = c.Address
            c.Value = 5
            Set c = .FindNext(c)
        Loop While Not c Is Nothing And c.Address <> firstAddress
    End If
End With

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Report •

August 16, 2011 at 22:36:34
Thanx 4 ur help

Report •

Related Solutions

Ask Question