Hi
My original code has a VBA script, which references an .xls file in another directory using the “Thisworkbook.path” keyword.
However, once I’ve compiled my workbook into an .exe, using Xls Padlock, and I try to run the .exe, the code attempts to access the workbook from the a:\ drive (a:\Office…) If I change “Thisworkbook.path” to “Activeworkbook.path”, which i think may be wrong, it now tries to access the file using the q:\ directory (q:\Office…).
Is there a way around this? I’d like to keep directory paths relative so that I can run my code wherever it gets pasted.
Kind regards
Spartan
My original code has a VBA script, which references an .xls file in another directory using the “Thisworkbook.path” keyword.
However, once I’ve compiled my workbook into an .exe, using Xls Padlock, and I try to run the .exe, the code attempts to access the workbook from the a:\ drive (a:\Office…) If I change “Thisworkbook.path” to “Activeworkbook.path”, which i think may be wrong, it now tries to access the file using the q:\ directory (q:\Office…).
Is there a way around this? I’d like to keep directory paths relative so that I can run my code wherever it gets pasted.
Kind regards
Spartan
Last edited: