Hi All,
I am creating anew macro that will contain some nested IF(AND statements featuring the Vlookup of data from several different workbooks. What I need to be able to do is to identify via VBA, the folder that the open file I am running the macro in is located. This is needed so that I can locate and open the files I need to do the Vlookup against.
Essentially: Workbook A is the main file that I am running the macro on. It needs to know which folder/pathway Workbook A is opened from because the remaining files in the folder (Workbooks B through D) will need to be opened sequentially, have the vlookup run against it and closed. I need to do it this way because there will be different folders (named differently/different pathway) that will need this same macro run.
How do I determine this with VBA and insert it into my code?
Thanks
Jeff
I am creating anew macro that will contain some nested IF(AND statements featuring the Vlookup of data from several different workbooks. What I need to be able to do is to identify via VBA, the folder that the open file I am running the macro in is located. This is needed so that I can locate and open the files I need to do the Vlookup against.
Essentially: Workbook A is the main file that I am running the macro on. It needs to know which folder/pathway Workbook A is opened from because the remaining files in the folder (Workbooks B through D) will need to be opened sequentially, have the vlookup run against it and closed. I need to do it this way because there will be different folders (named differently/different pathway) that will need this same macro run.
How do I determine this with VBA and insert it into my code?
Thanks
Jeff