Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - Find My Directory method 1

Status
Not open for further replies.

Locoman

Technical User
Sep 25, 2002
38
0
0
GB
Hi Folks,

I want to be able to distribute an Excel graphs report spreadsheet, along with a corresponding Access database, for users to install in any directory. So, I need to be able to modify the importing of the various data to Access and queries from Excel to suit the installed path, but I would prefer that this is completely transparent to the user.

I can do this easily with the Access part, but my problem is that I can't seem to find the equivalent in Excel to the Access function db.Name which I use like this:

Dim MyLocation As Database
Dim FullName As Variant
Set MyLocation = CurrentDb()
FullName = MyLocation.Name

FullName then holds the complete path to the application

Is there any equivalent method in Excel?

Regards,

Brian
 
Me.Path?

Hope this helps

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Or if you want the application name included as well you can use Me.FullName.

Hope this helps

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Hi Harley - thanks for the prompt reply and Star for you.

I tried Me.path but this would not work since I wanted to put this code in a Module. A bit of experimenting later and making it a function call got it to work as

MyDirectory = MyObject.Path

Thanks
 
Glad you got it working, thanks for the star [smile]

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top