Solved Copy folder (1 Viewer)

Number11

Member
Local time
Today, 02:43
Joined
Jan 29, 2020
Messages
228
Hi so i want to save the file that i have selected using

Dim oExcel As Excel.Application
Dim oWb As Excel.Workbook
Set oExcel = CreateObject("Excel.Application")
Dim dlg As FileDialog
Set dlg = Application.FileDialog(msoFileDialogFilePicker)

With dlg
.Title = "Select the Excel file to import"
.AllowMultiSelect = False
.Filters.Clear
.Filters.Add "Excel Files", "*.xlsx", 1
.Filters.Add "All Files", "*.*", 2
.InitialFileName = "c:\"


to a new folder location

cant seem to get it to work using

filecopy
 

CJ_London

Super Moderator
Staff member
Local time
Today, 02:43
Joined
Feb 19, 2013
Messages
12,755
Use .show to open the file picker then when selected use the .itemsselected to get there filename, then use filecopy
 

Number11

Member
Local time
Today, 02:43
Joined
Jan 29, 2020
Messages
228
Use .show to open the file picker then when selected use the .itemsselected to get there filename, then use filecopy

Thanks got it working like this....
For Each SourceFile In .SelectedItems
FileCopy SourceFile, "E:\" _
& Mid$(SourceFile, InStrRev(SourceFile, "\") + 1)
Next
 

Users who are viewing this thread

Top Bottom