Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA Path Confusion between Appl and Personal.xls
Is it as simple as ActiveWorkbook.Path instead of ThisWorkbook.Path?
-- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "MWE" wrote in message ... 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA Path Confusion between Appl and Personal.xls
No; the problem remains.
There seems to be some underlying problem in doing this cross application reference. Everything gets amazingly screwed up. For example, I build several menus using a general purpose menu building routine that pulls information out of a tab in the base application ("A"). If the menu building occurs after the "cross reference", the menus are fine and the macro references are A! macroname. If the menu building occurs after the cross referencing, the menus are built, but the macro references are now Personal.xls!macroname. -----Original Message----- Is it as simple as ActiveWorkbook.Path instead of ThisWorkbook.Path? -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "MWE" wrote in message ... 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 . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
In one appl. I have lost the vert. scroll bar.Tools no help | Excel Worksheet Functions | |||
How do I set up and use Month day, year format with other appl? | Excel Discussion (Misc queries) | |||
make excel appl. fit for euro zone | Excel Discussion (Misc queries) | |||
Scatter Chart Axis as text in C# Web appl | Charts and Charting in Excel | |||
Appl need that VLOOKUP will not handle | Excel Worksheet Functions |