Question about VBA?

  • Thread starter Thread starter OneofLittleword
  • Start date Start date
O

OneofLittleword

I have an excel workbook with 16 different work sheets in it. Can VBA
be used to .....

1. Create a form / query that will first search for a chosen work
sheet then return the requested information?

If this is possible what would be good reading/info on such things.

If it is not possible... What could be used to make use of my existing
excel workbook to do this.


TIA on any info provided.


JAY
 
A general question, so a general answer:

On possibility:
Yes, you should be able to put up a userform and query for the information
desired. Then you can loop through the sheets and use the find method of
the range object to search the sheet for the information.

go to google groups advanced search

http://groups.google.com/advanced_group_search?hl=en

search this newsgroup microsoft.public.Excel.programming

for find multiple sheets

And you should get some previous responses that contain sample code.
 
something like this?

Sub selectfind()
Sheets(InputBox("Desired sheet")).Select
Application.Goto Range(Cells.Find(InputBox("Desired Text")).Address)
End Sub

or you might prefer a vlookup formula
=vlookup(info desired, lookuptable,column,false)
=vlookup(123,sheet4!a2:x200,4,false)
 
The workbook info about 16 different locations/sheets and all of the
buildings located at each location.

What I am trying to do is ....

Have a userform set up so that the user can select a sheet name from
cell A1, then input a building number into cell A2.

Then have the search return the building information in the following
cells (i.e. . What the building is, Who is in charge of the building,
and the phone number to contact the person.)

I hope this better explains what I am looking for.
 
Back
Top