With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.
Public Function GetDirectory() 'This script allows the user to select a directory, 'making it possible for results to be exported to that 'directory. On Error GoTo ErrorHandler Dim strFolderPath As String Dim fd As Office.FileDialog 'Create a FileDialog object as a Folder Picker dialog box. Set fd = Application.FileDialog(msoFileDialogFolderPicker) With fd .Title = "Identify the database(s) containing your source data" .ButtonName = "Select" .InitialView = msoFileDialogViewDetails .InitialFileName = "\\ShareServer\" If .Show = -1 Then strFolderPath = CStr(fd.SelectedItems.Item(1)) & "\" Else Debug.Print "User pressed Cancel" strFolderPath = "" End If End With GetDirectory = Trim(strFolderPath) ErrorHandlerExit: Exit Function ErrorHandler: MsgBox "Error No: " & Err.Number & "; Description: " & Err.Description Resume ErrorHandlerExit End Function
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.