Delta Star
Board Regular
- Joined
- Oct 28, 2009
- Messages
- 184
I'm using this code I've found on the site to enter the name of a file selected.
However the cell shows the full path name and extension, I need it to show the file name only.
Can anyone assist?
HTML:
OpenFile = Application.GetOpenFilename("Textfiles (*.txt),*.txt", , "Open a textfile...")
Sheets("Test").Range("J2").Value = OpenFile
However the cell shows the full path name and extension, I need it to show the file name only.
Can anyone assist?