taz23340
Active Member
- Joined
- Jun 11, 2003
- Messages
- 336
hello everyone,
I am having an issue with the file location my formula is reading. Our IT dept is changing the folder locations and as such I would like to have a macro that i dont have to update every second day.
current scenario-we use windows exploder to access the macro, open it. then open our data dump or transfer and run the macro once we are in cell a1.
however when i run the below code, a open file dialog box opens.
Range("a21:av21").Value = "=VLOOKUP(A20,'K:\SpreadsheetBilling\MISC\MACROS\[E51_Macro_Bilingual_August_2010.xls]Headers'!$A$1:$C$50,3,FALSE)"
as you can see it is a network drive.
I would like make the macro start off by finding the location of the file the macro is in, not the one im going to run the macro on.
all the code i can find that will find the location is `getfilename` but that is asking for a location, however i want it to give me the location and then use that location in the above formula.
i hope this is possible.
please let me know.
kevin
I am having an issue with the file location my formula is reading. Our IT dept is changing the folder locations and as such I would like to have a macro that i dont have to update every second day.
current scenario-we use windows exploder to access the macro, open it. then open our data dump or transfer and run the macro once we are in cell a1.
however when i run the below code, a open file dialog box opens.
Range("a21:av21").Value = "=VLOOKUP(A20,'K:\SpreadsheetBilling\MISC\MACROS\[E51_Macro_Bilingual_August_2010.xls]Headers'!$A$1:$C$50,3,FALSE)"
as you can see it is a network drive.
I would like make the macro start off by finding the location of the file the macro is in, not the one im going to run the macro on.
all the code i can find that will find the location is `getfilename` but that is asking for a location, however i want it to give me the location and then use that location in the above formula.
i hope this is possible.
please let me know.
kevin