Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
In one appl. I have lost the vert. scroll bar.Tools no help Robt. Excel Worksheet Functions 1 November 17th 06 03:49 AM
How do I set up and use Month day, year format with other appl? [email protected] Excel Discussion (Misc queries) 2 June 26th 06 10:51 PM
make excel appl. fit for euro zone Nick Hodge Excel Discussion (Misc queries) 0 July 23rd 05 08:08 PM
Scatter Chart Axis as text in C# Web appl Pavr1 Charts and Charting in Excel 1 March 31st 05 05:28 AM
Appl need that VLOOKUP will not handle Wayne G. Dengel Excel Worksheet Functions 6 November 7th 04 08:02 AM


All times are GMT +1. The time now is 09:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"