Hey All,
I'm a little rusty with my VBA. I want to reference a file that will always be in the same directory as the excel book holding the VBA. Is there a variable I can use that will give me my workbook's location... Thanks!
-Brian
Hey All,
I'm a little rusty with my VBA. I want to reference a file that will always be in the same directory as the excel book holding the VBA. Is there a variable I can use that will give me my workbook's location... Thanks!
-Brian
Yes,
ThisWorkbook.Path
New to the forum? Check out our Introductions section to get to know some of the members here. Feel free to tell us a little about yourself as well.
Worked perfectly. You wouldn't know of a similar feature for power point would you?
Nevermind- it is ActivePresentation.Path
Thanks!
Something interesting to note:
In the ThisWorkbook class module:
Msgbox Me.Path
In any Sheet class module:
Msgbox Me.Parent.Path
New to the forum? Check out our Introductions section to get to know some of the members here. Feel free to tell us a little about yourself as well.