[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

Read in filename from a directory to do a Vlookup

Asked by asarda in Visual Basic Programming, Microsoft Excel Spreadsheet Software

I need to get a filename from  a directory, for example C:\Test\a.xls then do a vlookup using that file. I pasted a sample code, not sure if I am going down the right path....
1:
2:
3:
4:
5:
6:
7:
8:
Dim strPath As String
    
    fileToOpen = Application.GetOpenFilename
    strPath = fileToOpen
    MsgBox strPath
Range("K3").Select
ActiveCell.FormulaR1C1 = _
        "=VLOOKUP(RC[-3],[strPath]Sheet1!C1:C9,1,FALSE)"
[+][-]10/30/09 06:09 PM, ID: 25707889Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091118-EE-VQP-93 - Hierarchy / EE_QW_3_20080625