PDA

View Full Version : A Simple search



james123
12-18-2006, 04:15 PM
I am trying to implement a simple search in my spreadsheet, at the moment the workbook has 8 sheets, 1 menu page and then 7 sheets of which have the same table headings but are split by location. I want to be able to search the ID column in the 7 data sheets, either from a cell which the user would type into on the menu page or ideally a dialog box, and find which sheet contains the ID and simply make that the active cell.

Also if possible, I would like the results from the search to be displayed in a form (database style) for editing so only that row is changeable.
Ideally I would have made a database for the whole thing, but the guys who will be using this don't have access to database software.

Sorry for all the questions but I am well out of my depth. I have attached the workbook so feel free to play around and change what ever as I have a copy, or let me know if any of my requests are possible?

Thanks guys this will be so useful

ps. Please let me know if this makes no sence or needs more examples

mdmackillop
12-18-2006, 04:55 PM
Hi James,
Welcome to VBAX
I've attached a Userform with a few textboxes to your Go button. Let us know how you get on
regards
MD

james123
12-18-2006, 05:32 PM
wow, that's cool thank you so much!
A quick few question,
1) is it possible to auto press the search button on the form?
2) How would I add more fields to the form?
Thanks so much for your help

mdmackillop
12-18-2006, 05:40 PM
1) Yes. The button macro can be moved to the Initialise code

2) Open the VB Editor (Alt + F11) and select the userform. Find the Toolbox and draw the textboxes and labels as required. Use the Properties window to check/change the textbox names.

james123
12-18-2006, 05:55 PM
thank you!

Any other questions and i know were to ask