Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting a file from dialog
Hello,
Most of the exemple show how to launch from VBA a dialog to open a file from a directory. Is there a dialog that is used to select the file so i can use its path name in the module, without opening the file? Regards Avi www.avibenita.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting a file from dialog
Avi,
The following code will display the File Open dialog and return the selected file name. It doesn't open the file. Dim FName As Variant FName = Application.GetOpenFilename() If FName = False Then ' no file selected Else MsgBox "You chose: " & FName End If For other methods of selecting just a folder (not a file), see http://www.cpearson.com/excel/BrowseFolder.htm -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Avi" wrote in message ... Hello, Most of the exemple show how to launch from VBA a dialog to open a file from a directory. Is there a dialog that is used to select the file so i can use its path name in the module, without opening the file? Regards Avi www.avibenita.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Selecting Cells using dialog box | Excel Programming | |||
Selecting a file path in Excel VBA using FileOpen dialog | Excel Programming | |||
Prompt user to select file with default file selected dialog | Excel Programming | |||
Prompt user to select file with default file selected dialog | Excel Programming | |||
Prompt user to select file with default file selected dialog | Excel Programming |