M
Mick
This is probably staring me in the face but I can't find the answer so would
appreciate help. I am using the XP FileDialog to obtain a file name which
then becomes a text value in a field on an Access form. I can get the full
path but I cannot figure how to get just the file name except by parsing the
string. I know how to get the file name using WSH FileSystemObject but can't
figure how to do it in Access VBA. Can somebody please tell me what I'm
missing?
Thanks
Dim dlgOpen As FileDialog
Dim vrtSelectedItem As Variant
Set dlgOpen = Application.FileDialog(msoFileDialogOpen)
dlgOpen.Show
vrtSelectedItem = dlgOpen.SelectedItems(1) ' gives full path
appreciate help. I am using the XP FileDialog to obtain a file name which
then becomes a text value in a field on an Access form. I can get the full
path but I cannot figure how to get just the file name except by parsing the
string. I know how to get the file name using WSH FileSystemObject but can't
figure how to do it in Access VBA. Can somebody please tell me what I'm
missing?
Thanks
Dim dlgOpen As FileDialog
Dim vrtSelectedItem As Variant
Set dlgOpen = Application.FileDialog(msoFileDialogOpen)
dlgOpen.Show
vrtSelectedItem = dlgOpen.SelectedItems(1) ' gives full path