View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nigel Nigel is offline
external usenet poster
 
Posts: 923
Default VBA - Open Folder Where .xls Resides

Use the ChDir before the Application.GetOpenFilename dialog to set the
path.........

e.g.....

ChDir "C:\Nigel"
fn2 = Application.GetOpenFilename("Current MPI File,*.mpi", 1, _
"Select NEW MPI File To Open", , False)

--
Cheers
Nigel



"ajocius" wrote in
message ...

Group,
Another novice question. When I open a file I use the following
code. The first use of my spreadsheet always begins in a folder other
than where the files are located. Once I navigate to the folder where
my files are located, Excel remembers the path. Then each subsequent
opening and Excel opens that folder. Is there a way to always open the
folder where my spreadsheet is located? Assume my files are located in
folder c:\MPI .




fn2 = Application.GetOpenFilename("Current MPI File,*.mpi", 1,
"Select NEW MPI File To Open", , False)


Tony


--
ajocius
------------------------------------------------------------------------
ajocius's Profile:

http://www.excelforum.com/member.php...o&userid=17695
View this thread: http://www.excelforum.com/showthread...hreadid=470534