Vlookup with an InputBox

J

Jeff

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.
 
D

Dave Peterson

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.
 
J

Jeff

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.
 
D

Dave Peterson

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.
 
Top