G
Guest
I have used the common add/save dialog box to let a user find a file he wants to import, but I can't figure out how to let them just select a directory or a drive (like A: or B to import specific files from or export files to. I don't want to use an input box, because it is too easy for them to incorreclty enter a path.
The code (part of it) I use to identify a specific excel file to import is this:
strFilter = adhAddFilterItem(strFilter, " (*.xls)", "*.xls")
lngFlags = adhOFN_HIDEREADONLY Or adhOFN_HIDEREADONLY Or adhOFN_NOCHANGEDIR
varFileName = adhCommonFileOpenSave( _
OpenFile:=True, _
Filter:=strFilter, _
Flags:=lngFlags, _
DialogTitle:="Locate Data database file")
But this requires a file name in order to be able to select "Open" in the dialog box. The intent is to have the user identify a path or the root directory of a drive (A:\) to copy a bunch of files to. Once they have identified the path, the code will use the TransferText action to send it to the "Destination" & "filename.txt"
The code (part of it) I use to identify a specific excel file to import is this:
strFilter = adhAddFilterItem(strFilter, " (*.xls)", "*.xls")
lngFlags = adhOFN_HIDEREADONLY Or adhOFN_HIDEREADONLY Or adhOFN_NOCHANGEDIR
varFileName = adhCommonFileOpenSave( _
OpenFile:=True, _
Filter:=strFilter, _
Flags:=lngFlags, _
DialogTitle:="Locate Data database file")
But this requires a file name in order to be able to select "Open" in the dialog box. The intent is to have the user identify a path or the root directory of a drive (A:\) to copy a bunch of files to. Once they have identified the path, the code will use the TransferText action to send it to the "Destination" & "filename.txt"