#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 202
Default file path

Is it possible to get the name of a file path of a non active workbook using
a formula and vba?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default file path

You changed questions???

dim wkbk1 as workbook
dim wkbk2 as workbook

set wkbk1 = workbooks("book1.xls")
set wkbk2 = workbooks("book2.xls")

wkbk1.activate
'now wkbk1 is active

msgbox wkbk2.name & wkbk2.fullname & wkbk2.path

I'm not sure what you mean by formula.

If you want a formula in book1.xls that returns the path of book2.xls, you could
put this in a cell:

=cell("filename",
then use the mouse to point at a cell in any sheet in book2.xls
and type a closing parenthesis ).



Jane wrote:

Is it possible to get the name of a file path of a non active workbook using
a formula and vba?


--

Dave Peterson
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
importing a particular excel worksheet into another excel file dinouk Excel Worksheet Functions 0 August 10th 06 02:03 PM
Excel file and path Footers Controller Bill Excel Discussion (Misc queries) 3 July 6th 06 05:15 PM
Using Relative path for XML data file? Mark W. Robbins Charts and Charting in Excel 0 June 7th 06 06:41 AM
File A and File B Together BillCPA Excel Discussion (Misc queries) 1 June 6th 06 03:18 PM
full path of excel file Song Excel Discussion (Misc queries) 2 August 21st 05 06:50 PM


All times are GMT +1. The time now is 08:24 PM.

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

About Us

"It's about Microsoft Excel"