Vlookup with an InputBox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
Is it possible with VBA to enter the Table_Array of a Vlookup with an
Inputbox?
My problem is that the vlookup that I run needs a table_Array that could
resides in several directories.
 
Maybe...

But then you'd have to rely on the typing of the user.

Maybe you could use application.getopenfilename to retrieve the filename, then
open that workbook, then use application.inputbox to get the range out of that
workbook.

Another option if the address/worksheet names/workbook names/folder names don't
change.

Make a list with all the options, put it into a combobox. Let the user select
from that list.
 
Hi Dave,

I need the application application.inputbox to get the file since the range
will not change and will be set.
--
Regards,
Jeff



Dave Peterson said:
Maybe...

But then you'd have to rely on the typing of the user.

Maybe you could use application.getopenfilename to retrieve the filename, then
open that workbook, then use application.inputbox to get the range out of that
workbook.

Another option if the address/worksheet names/workbook names/folder names don't
change.

Make a list with all the options, put it into a combobox. Let the user select
from that list.
 
What are you trying to retrieve from the user?

If it's the file name, I'd use application.getopenfilename.

If it's a range from an already open workbook, then application.inputbox makes
sense.

But since that range doesn't change, it sure sounds like you just want to get
the filename that containst that range.
Hi Dave,

I need the application application.inputbox to get the file since the range
will not change and will be set.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top