Private Sub Command5_Click()
Dim mydlg As Office.FileDialog
Dim FSO As Object
Dim ServerReport As String
ServerReport = DLookup("Test_Field", "Test", "ID = 1")
Set mydlg = Application.FileDialog(msoFileDialogFilePicker)
With mydlg
.AllowMultiSelect = True
.Title = "Select .xml folder to import"
.InitialFileName = CurrentProject.path
.Filters.Clear
.Filters.Add ".xml", "*.xml*"
If .Show = -1 Then
For Each vrtSelectedItem In .SelectedItems
Next
Else
MsgBox "You must select an excel file to import into access table", vbOKOnly + vbInformation, "Excel"
Set mydlg = .SelectedItems
End If
Set FSO = CreateObject("scripting.filesystemobject")
FSO.CopyFile Source:=mydlg, Destination:=ServerReport
MsgBox "You can now find the server reports in " & ServerReport, vbInformation, "Server Report"
End With
End Sub
I am trying to select xml files using a file dialog to then move them to another folder defined in my access database, but i can't seem to find a way that will copy the files to the folder and also before the files are moved they need to be extracted from a zip file Thank in Advance Luke B.