Private Sub cmdDocsPath_Click()
'Created by Helen Feddema 28-Nov-2005
'Modified by Helen Feddema 29-Sep-2008
On Error GoTo ErrorHandler
'Create a FileDialog object as a Folder Picker dialog box.
Set fd = Application.FileDialog(msoFileDialogFolderPicker)
Set txt = Me![txtDocsPath]
.Title = "Browse for folder where __________"
.ButtonName = "Select"
.InitialView = msoFileDialogViewDetails
'.InitialFileName = strPath
If .Show = -1 Then
strPath = CStr(fd.SelectedItems.Item(1))
txt.Value = strPath
strPropertyName = "DocumentsPath"
strPropertyValue = strPath & "\"
lngDataType = dbText
Call SetProperty(strPropertyName, lngDataType, _
Debug.Print "User pressed Cancel"
On Error Resume Next
MsgBox "Error No: " & Err.Number _
& " in " & Me.ActiveControl.Name & " procedure; " _
& "Description: " & Err.Description
Open in new window
The revolutionary project management tool is here! Plan visually with a single glance and make sure your projects get done.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.
Premium members get this course for $159.20.
Premium members get this course for $167.20.
Premium members get this course for $151.20.
Premium members get this course for $79.20.
Premium members get this course for $349.00.
Premium members get this course for $168.80.
Premium members get this course for $174.99.