Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
'Open File' Functionality
I am looking to add 'open file' functionality to a VBA program. I would
like to give the user the ability to browse a through directories to find and select a file. The functionality would be similar to the window that comes up when you go to File/Open. Is there a simple way to add this functionality (perhaps a VBA command) or is there freely available code that does this? thanks - db79 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
'Open File' Functionality
Here is some VBA code that I have used to "browse" for a file, then
display the document's name into the selected cell. Sub browse1() Range("E6").Select Var1 = Application.GetOpenFilename(FileFilter:="Word Files (*.doc), *.doc", Title:="Full Document Name") fileToOpen = Right(Var1, Len(Var1) - InStrRev(Var1, Application.PathSeparator)) ActiveCell.Value = fileToOpen End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel Template functionality without using "File-New" | Excel Discussion (Misc queries) | |||
In Excel - Use Windows Explorer instead of File Open to open file | Excel Discussion (Misc queries) | |||
Open a file do a macro ( made) and open next succesive file | Excel Programming | |||
Open File or Switch Between Windows if File is Open | Excel Programming | |||
Open File or Switch Between Windows if File is Open | Excel Programming |