#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Path


Hi I am having a problem. I thought that thisworkbook.path would give m
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 t
nothing.
Now I am trying to distribute the file and I need to set the curdir t
the dirertory of the open workbook. I can navigate from there but
cant seem to do this even if I set DefaultFilePath to "" Since th
workbook is already open.
Rod Taylo

--
rjtaylo
-----------------------------------------------------------------------
rjtaylor's Profile: http://www.excelforum.com/member.php...nfo&userid=590
View this thread: http://www.excelforum.com/showthread.php?threadid=26595

  #2   Report Post  
Posted to microsoft.public.excel.programming
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Path

A workbook doesn't have a path until it has been saved.

Perhaps you are setting it before the workbook has been saved.

DefaultFilePath is only applicable when Excel starts up. You should need to
work with that attribute.

--
Regards,
Tom Ogilvy


"rjtaylor" wrote in message
...

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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default Path

If the workbook has never been saved, it doesn't have a path. Could this be
the problem?


On Sun, 3 Oct 2004 19:23:30 -0500, 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


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
File Path Too Long? Not Anymore! Check out Long Path Tool Max Loger Excel Discussion (Misc queries) 1 March 24th 17 07:59 AM
http://CannotDeleteFile.net - Cannot Delete File? Try Long Path ToolFilename is too long? Computer Complaining Your Filename Is Too Long? TheLong Path Tool Can Help While most people can go about their businessblissfully unaware of the Windo Max Loger Excel Discussion (Misc queries) 0 June 14th 11 04:30 PM
Formula too long - new file path is shorter than old file path - Excel 2003 Greg J Excel Worksheet Functions 1 November 22nd 06 05:16 PM
hyperlink navigation path path wrong in Excel 2003 CE Admin Excel Discussion (Misc queries) 5 January 7th 06 07:47 PM
how to change absolute path to relative path hwijgerse Excel Worksheet Functions 0 November 25th 05 07:18 AM


All times are GMT +1. The time now is 03:39 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"