By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,098 Members | 1,881 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,098 IT Pros & Developers. It's quick & easy.

Open Folder Dialog and put full selected folder path in textbox

P: 32
Hi guys,

I want a command button which when presed opens the Folder dialog box and when a folder has been selected the full path appears in a text box.... I can't for the life of me fathom out how to do it.... Help please?
Feb 25 '14 #1
Share this Question
Share on Google+
3 Replies


Expert 100+
P: 634
Hi

You can use something like this
Expand|Select|Wrap|Line Numbers
  1.     With Application.FileDialog(msoFileDialogFolderPicker)
  2.         .AllowMultiSelect = False
  3.         .Title = "Dialogue Caption/Title"
  4.  
  5.         If .Show = -1 Then
  6.             'Assign folder returned to text box here
  7.             MsgBox .SelectedItems.Item(1)
  8.         End If
  9.     End With
You can find more info on Application.FileDialog in Access help.

HTH
Feb 25 '14 #2

P: 32
perfect. muchly appreciated :)
Feb 25 '14 #3

zmbd
Expert Mod 5K+
P: 5,397
For more information you should read thru the following insight article:
Select a File or Folder using the FileDialog Object
Feb 25 '14 #4

Post your reply

Sign in to post your reply or Sign up for a free account.