DeanP
12-20-2018, 10:05 AM
I am trying to get the filenames from a folder and place it in a textbox. I am using File Dialog Open to
get the file path\filenames.
Someone kindly helped me to get the directory using InStrRev:
n = InStrRev(fDialog.SelectedItems(1), "\")
TextBox2.Value = Left(fDialog.SelectedItems(1), n)
I want the filename instead, so I found
varFileName = Mid(fDialog.SelectedItems(1), InStrRev(fDialog.SelectedItems(1), "\") + 1, Len(fDialog.SelectedItems(1)))
I don't know how to put all of this together to get the file name into TextBox2.
Any help would be appreciated.
get the file path\filenames.
Someone kindly helped me to get the directory using InStrRev:
n = InStrRev(fDialog.SelectedItems(1), "\")
TextBox2.Value = Left(fDialog.SelectedItems(1), n)
I want the filename instead, so I found
varFileName = Mid(fDialog.SelectedItems(1), InStrRev(fDialog.SelectedItems(1), "\") + 1, Len(fDialog.SelectedItems(1)))
I don't know how to put all of this together to get the file name into TextBox2.
Any help would be appreciated.