excel - VBA code to search contacts on another sheet -


I am creating a workbook that has an add and search area on the first sheet and a contact list on the other sheet; Last name, first name, #, address and email I have come to know how to add contacts to this sheet, but I can not understand how to search for this list (second sheet) for contact, also the first sheet And it is displayed back on the first sheet I know I probably need a string, but how do I set it up?

You might use this code:

  = ComboBox1.Value as the dim border, after:. = Cells (1, 1), looking at: = xlValues, lookAt: Sheet ("Sheet2") on error set = rfound = .Columns (1) .Find (start with what is next = _ xlPart, SearchOrder: = XlByRows, SearchDirection: = xlNext, MatchCase: false =, SearchFormat:. = False) Goto 0 on the error is nothing rfound then then sub application.Goto rfound, if it is true to exit the sheet ("Sheet1") Range ("A1") = Rfound.Offset (0, 0)   

In this code you use columns for your data (last name, first name, #, address, And search for e-mails from among these lines Anyone can search for a whole line)

You can use an ActiveX control to search your data, or you can use only one cell, in the code I will use the combo box There is an array in which the array is used. A special column for easy search

Code for ComboBox :.

  Set West Bengal = Select ThisWorkbook wb.Sheets ("Sheet2") ComboBox1.RowSource = wbo.Sheets ("Shee T2"). Range ("A2", Sheet ("Sheet2"). Range ("A65536") and (xlUp)).     address

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -