Private Sub cmdSelectPhoto_Click()
Dim ofD As FileDialog
Dim file
Set ofD = Application.FileDialog(msoFileDialogOpen)
ofD.AllowMultiSelect = False
ofD.Filters.Clear
ofD.Filters.Add "Images", "*.gif; *.jpg; *.jpeg", 1
If ofD.Show = False Then
Exit Sub
Else
For Each file In ofD.SelectedItems
loc = file
MsgBox loc
Next file
End If
imgPic.Picture = loc
End Sub