Prompt for file name when using VLOOKUP

Tim in Toronto

New Member
Joined
Nov 18, 2004
Messages
47
Hi All,

I'm using this formula below to populate current inventory levels for product.

ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-15],'[Inventory Week 32 2007.xls]Inventory'!C1:C3,3,FALSE)"

However, what I would like to be able to do, is where it shows the file name "[Inventory Week 32 2007.xls]", I would like to have a message box come up so the user can browse for the file. The file is updated each week but the file is always different as it contains a date in the name.

Is this possible?

Tim :)
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Try using:
Code:
Dim FName as String
FName = Application.GetSaveAsFileName
This will bring up the save as dialog box. You can browse for a file and when you select the one you want, it will store the file path and name to the string FName.

Hope that helps! :)
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,253
Members
448,556
Latest member
peterhess2002

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top