ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   CurDir does not work (https://www.excelbanter.com/excel-programming/320505-curdir-does-not-work.html)

Jim73

CurDir does not work
 
Hi,

My "CurDir" does not work. I have:

Dim File_path As String
File_path = CurDir("")

Instead of showing my current directory (where the workbook I currently have
open lies), is it showing the directory of previously opened file, i.e. the
top file in the quick access list of files that can be found in the
menu/files.

Please help,









Ray Costanzo [MVP]

CurDir does not work
 
If you want the path in which the workbook exists, use Thisworkbook.Path.


--

Ray at work
Microsoft ASP/ASP.NET MVP


"Jim73" wrote in message
...
Hi,

My "CurDir" does not work. I have:

Dim File_path As String
File_path = CurDir("")

Instead of showing my current directory (where the workbook I currently

have
open lies), is it showing the directory of previously opened file, i.e.

the
top file in the quick access list of files that can be found in the
menu/files.

Please help,











Dave Peterson[_5_]

CurDir does not work
 
or activeworkbook.path

Jim73 wrote:

Hi,

My "CurDir" does not work. I have:

Dim File_path As String
File_path = CurDir("")

Instead of showing my current directory (where the workbook I currently have
open lies), is it showing the directory of previously opened file, i.e. the
top file in the quick access list of files that can be found in the
menu/files.

Please help,



--

Dave Peterson

Jim73

CurDir does not work
 
Thanx


"Dave Peterson" wrote:

or activeworkbook.path

Jim73 wrote:

Hi,

My "CurDir" does not work. I have:

Dim File_path As String
File_path = CurDir("")

Instead of showing my current directory (where the workbook I currently have
open lies), is it showing the directory of previously opened file, i.e. the
top file in the quick access list of files that can be found in the
menu/files.

Please help,



--

Dave Peterson



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com