![]()
Sub UploadFile() Dim DialogBox As FileDialog, sFileLocation As String, sSaveLocation As String 'Change your Destination Location Here... sSaveLocation = "D:\" Set DialogBox = Application.FileDialog(msoFileDialogOpen) With DialogBox .AllowMultiSelect = False .Filters.Clear .Filters.Add "PDF File", "*.PDF" .Title = "Select PDF file" If .Show = -1 Then sFileLocation = DialogBox.SelectedItems(1) CreateObject("scripting.filesystemobject").CopyFile sFileLocation, sSaveLocation MsgBox "File Uploaded Successfully", vbInformation, "Task Completed" Else MsgBox "No File Chosen", vbInformation, "File Not Selected" End If End With End Sub
Bookmarks