LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
ll ll is offline
external usenet poster
 
Posts: 67
Default vba browse button set to current directory

I am working with a form with browse buttons to load a file from a
certain directory; I would like for that directory to be the one that
holds the currently open excel/vba form. Currently, I am using curdir
and getting the 'default' storage location set up in Excel
(MyDocuments..).

'=============
Dim SaveDriveDir As String
SaveDriveDir = CurDir()
MsgBox (CurDir)
ChDir (SaveDriveDir)
NewFN = Application.GetOpenFilename(FileFilter:="Excel Files
(*.xls), *.xls", Title:="Please select a file")
'===============


Thanks for any help in this,

Louis

 
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
Change current directory to the directory that the workbook loads from! alondon Excel Programming 5 April 17th 07 06:05 AM
directory browse... mark Excel Programming 4 May 11th 05 06:34 PM
Directory Browse/Search information ZH875 Excel Programming 1 October 4th 04 10:05 PM
changing current directory to that of the current open file unnameable Excel Programming 2 May 19th 04 11:14 AM
Browse For Folder start directory Todd Huttenstine Excel Programming 2 May 12th 04 02:24 PM


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