Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to retrieve the directory of the currently open file?
Hello,
I need to be able to retrieve the directory of the excel file which is currently active. "CurDir" does not work, because if excel is set to "C:\My Documents" as the standard folder it always outputs this folder, although the document is actually in "C:\WINDOWS\Desktop". Can anyone help me with this? Thanks, Joepy |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to retrieve the directory of the currently open file?
Try this Joepy
Sub test() MsgBox ActiveWorkbook.Path End Sub -- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) www.rondebruin.nl "Joepy" wrote in message om... Hello, I need to be able to retrieve the directory of the excel file which is currently active. "CurDir" does not work, because if excel is set to "C:\My Documents" as the standard folder it always outputs this folder, although the document is actually in "C:\WINDOWS\Desktop". Can anyone help me with this? Thanks, Joepy |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to retrieve the directory of the currently open file?
Joepy,
Try Activeworkbook.Path John Joepy wrote: Hello, I need to be able to retrieve the directory of the excel file which is currently active. "CurDir" does not work, because if excel is set to "C:\My Documents" as the standard folder it always outputs this folder, although the document is actually in "C:\WINDOWS\Desktop". Can anyone help me with this? Thanks, Joepy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I change File Open default directory from My Documents | Setting up and Configuration of Excel | |||
How do I set up an Excel 2007 default directory for a File Open? | Excel Discussion (Misc queries) | |||
open file in current directory | Excel Worksheet Functions | |||
open file in current directory | Excel Discussion (Misc queries) | |||
Excel Slow File Open Directory Response | Excel Discussion (Misc queries) |