LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Member
 
Posts: 70
Default File Dialog Folder Picker open to particular folder

I'm currently using "Application.FileDialog(msoFileDialogFolderPicker) .Show" to have the user open a folder. When that dialog pops up, it automatically opens to the last folder that was opened. I'd like it to always open to the same root folder, so the user can select the correct folder from there. Is there a way to specify this? I've tried putting a change directory command before the file dialog code, but that didn't do anything.

Just fyi:

All of my folders are on a network path.

I usually use this to nativate to my network path:
Code:
Sub ChDirNet(szPath As String)
    Dim lReturn As Long
    lReturn = SetCurrentDirectoryA(szPath)
    If lReturn = 0 Then Err.Raise vbObjectError + 1, "Error setting path."
End Sub
'Use this when I want to change directories in my code:
ChDirNet("my file path")
 
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
Find file in folder and sub-folder and sub-folder and sub-folderand etc... Charlotte E.[_3_] Excel Programming 1 September 15th 12 12:21 PM
Open Folder dialog box Brad Excel Programming 4 February 8th 11 02:03 AM
Check for file in folder, if not there, open folder to rename file Don M. Excel Programming 9 October 22nd 08 07:34 PM
Save file in a new folder, but create folder only if folder doesn't already exist? nbaj2k[_40_] Excel Programming 6 August 11th 06 08:41 PM
open file from folder save in new folder tim64[_3_] Excel Programming 20 June 17th 05 07:58 PM


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