PDA

View Full Version : ThisWorkbook.Path



Rasm
12-20-2011, 03:43 AM
I am using an XLAM file - will ThisWorkbook.Path always return the path of the XLAM file - even if I read in data from other macro embedded files? - I need to read the path of the XLAM file as I have support file in a subfolder below where the XLAM reside.

Admin
12-20-2011, 06:17 AM
Hi,

from excel help file...


Use this(ThisWorkbook) property to refer to the workbook that contains your macro code. ThisWorkbook is the only way to refer to an add-in workbook from inside the add-in itself. The ActiveWorkbook property doesn't return the add-in workbook; it returns the workbook that's calling the add-in.

Rasm
12-20-2011, 07:31 AM
What I was hoping = Guess I should use help more often - thanks