Hi all, I am hoping that I am just having a syntax problem here.
I am using GetOpenFileName to get the name of a database that is downloaded from a webserver and use it as a comparison database for a file that I am working with. Problem is that the name of the file changes constantly and I need to preserve the name so I can't just call it the same thing all the time.
I know I could re-save as a constant name but I think that's a bit sloppy and I may need to distribute this Macro throughout my unit and want to keep it as simple as possible for the enduser.
Anyway here is my issue, if I am using 'x' as my variable for GetOpenFileName, how do I use that variable in a VLOOKUP formula i.e.
(ActiveCell.FormulaR1C1 = "=UPPER(VLOOKUP(RC[-13], ['x']Sheet1!C1:C8, 8, FALSE))
I am using GetOpenFileName to get the name of a database that is downloaded from a webserver and use it as a comparison database for a file that I am working with. Problem is that the name of the file changes constantly and I need to preserve the name so I can't just call it the same thing all the time.
I know I could re-save as a constant name but I think that's a bit sloppy and I may need to distribute this Macro throughout my unit and want to keep it as simple as possible for the enduser.
Anyway here is my issue, if I am using 'x' as my variable for GetOpenFileName, how do I use that variable in a VLOOKUP formula i.e.
(ActiveCell.FormulaR1C1 = "=UPPER(VLOOKUP(RC[-13], ['x']Sheet1!C1:C8, 8, FALSE))