Thread: Path
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_3_] Dave Peterson[_3_] is offline
external usenet poster
 
Posts: 2,824
Default Path

Thisworkbook.path will give the path for the workbook containing the code--and
that's not always the activeworkbook.

Activeworkbook.path will give the path for the active workbook--not always the
one with the code.

The only time I've seen the .path return "" is if the workbook hasn't been ever
saved--it's been created File|New (or the equivalent in code).

rjtaylor wrote:

Hi I am having a problem. I thought that thisworkbook.path would give me
the path of the current workbook.
If I set a= thisworkbook.path
a =""
I dont understand what I changed. I use to set the DefaultFilePath to
nothing.
Now I am trying to distribute the file and I need to set the curdir to
the dirertory of the open workbook. I can navigate from there but I
cant seem to do this even if I set DefaultFilePath to "" Since the
workbook is already open.
Rod Taylor

--
rjtaylor
------------------------------------------------------------------------
rjtaylor's Profile: http://www.excelforum.com/member.php...fo&userid=5902
View this thread: http://www.excelforum.com/showthread...hreadid=265956


--

Dave Peterson