Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers. It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.
Option Compare Database Sub b() Dim fDialog As FileDialog Dim varFile As Variant Dim FilePath As String Dim FileName As String Dim fs As Object Dim SavePath As String Dim OpenFile As Variant Set fs = Interaction.CreateObject("Scripting.FilesystemObject") 'Declare SavePath for Documents SavePath = "\\Path\to\share\Directory\" 'Set up the File Dialog Set fDialog = Application.FileDialog(msoFileDialogFilePicker) With fDialog 'Do not Allow user to select multiple files .AllowMultiSelect = False 'Set the title of the Dialog box .Title = "Please select the file you want to move" 'Clear our the current filters and add our own .Filters.Clear .Filters.Add "Adobe PDF", "*.PDF" .Filters.Add "All Files", "*.*" 'Show the Dialog box. If the .Show method returns True, the 'user picked a file. If the .Show method returns 'False, the user clicked cancel. If .Show = True Then 'Display what file the user picked For Each varFile In .SelectedItems Me.DocumentLocation.Value = SavePath 'Copy the File to the Share fs.Copyfile varFile, SavePath MsgBox ("The file you selected is - " & varFile) Set fs = Nothing Next 'The User Pressed the Cancel button Else MsgBox ("You clicked cancel!") End If End With End Sub
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.