Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro question

Status
Not open for further replies.

msnook

Technical User
Jul 6, 2007
41
US
In my Excel Spreadsheet I have a list of names.

George Washington
Abraham Lincoln
Albert Einstien

I am using an input box so that I can choose a name and then search for data associated to that particular name.

MySearch = Application.InputBox("Which person do you want to run records for?")

The macro then opens a seperate spreadsheet and looks for all of the data associated with the particular name I picked. (MySearch)

I have two questions.

1) How do I place MySearch info into cell "A11" on my spreadsheet? The macro works as I have it written. It performs the search and gets my data but I can not figure this part out.

2) Is there a better way to do this? ie some sort of box that displays the list of names where I could choose the person whose data I want to retrieve.
Thanks in advance for all of your assistance.
 



Hi,

Code:
SomeSheetRef.Range("A11")= MySearch
Check out Data Validation - LIST

Skip,

[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue]
 
msnook,
To answer your question 2. I would make form with a combobox that can be populated with your list of names. You can make the combobox able only to have the user select a name in the combobox. This I beleive will help with mispellings. From this form you can most likey proceed with the information the same way as if the user used 1the input box.

ck1999
 


ck,

That's the very thing that a Data > Validation - LIST does.

Skip,

[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top