View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Geto Geto is offline
external usenet poster
 
Posts: 2
Default Hide file path on a text box

How can I improve this code?... I want to select a file on the computer, show
the name in a textbox after selected, and then clicking a button to open it.

So far this is what I have, is not exactly what I want but it works...
what I want to fix right now, is to hide the entire path of the file to be
opened and only display the file name... how can I do that?

fileToOpen = Application.GetOpenFilename("Excel files (*.xls), *.xls")
If fileToOpen < False Then TextBox1.Text = fileToOpen