Option Compare Database
Private Sub Command37_Click()
Dim FileSelection As Object
Set FileSelection = Application.FileDialog(3)
Dim varFile As Variant
Dim newFCL As String
With FileSelection
.AllowMultiSelect = False
.Title = "Please Select a Figure."
.InitialFileName = "c:\"
.Filters.Clear
.Filters.Add "Any File", "*.*"
End With
If FileSelection.Show Then
For Each varFile In FileSelection.SelectedItems
newFCL = varFile
FileName = Dir(varFile)
Next
MsgBox newFCL & " copied to Z:\02.ExamBuilder\Pics."
FileCopy newFCL, "Z:\02.ExamBuilder\Pics\" & FileName
Me.FigureLocation = "Z:\02.ExamBuilder\Pics\" & FileName
Else
MsgBox "No file selected", 64, "Cancel"
Exit Sub
End If
End Sub