View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
MWE[_2_] MWE[_2_] is offline
external usenet poster
 
Posts: 4
Default VBA Path Confusion between Appl and Personal.xls

I am running Excel2000 under WindowsXP. I have a half
dozen VB libraries in my Personal.xls file. The subs in
these libraries are referenced by dozens of Excel
applications. In some of these subroutines, there is code
that uses "path" data, e.g., ThisWorkbook.Path, to build
fully qualified paths to target directories for subsequent
use. Sub "B4" in library "B" ("B" is contained in
Personal.xls) has some of this path code.

When appl "A" calls sub "B4", the path that is returned is
not the location of "A" but the location of Personal.xls.
Is there a way to have a general routine in library "B"
that will fetch the path (location) of the calling
application?

Any help would be greatly appreciated.

Thanks