Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have created an option to search for a name in a userform and after you press search a new userform opens which shows the result. So far it works fine. On the second userform i have a button called Next result. I want to show the next result but i can't figure it out. Can some one have a look at this? The code used for the search option: Private Sub Zoekbtn_Click() If Searchform.firstname = "" Then msgbox "Enter a value" Else Call firstnamesearch Resultform.Show End If End Sub Private Sub firstnamesearch() With Worksheets("Employees").Range("a2:a500") Set f = .Find(Firstname, LookIn:=xlValues) If Not c Is Nothing Then 'Firstname found ..... ' Get data from this row i.e. containing firstname r = f.Row Resultform.Firstname = Cells(r, "A") Resultform.Lastname = Cells(r, "B") Resultform.Phonenumber = Cells(r, "C") Resultform.Mobile = Cells(r, "D") Resultform.Location = Cells(r, "E") Else msgbox "No data found" End If End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find First Non blank cell than find column header and return that value | Excel Worksheet Functions | |||
Despite data existing in Excel 2002 spreadsheet Find doesn't find | Excel Discussion (Misc queries) | |||
find and delete duplicate entries in two columns or find and prin. | Excel Programming | |||
find and delete text, find a 10-digit number and put it in a textbox | Excel Programming | |||
backwards find function to find character in a string of text | Excel Programming |