Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding a Workbook's Location
Hello,
I would like to find a workbooks on the C directory, but searching all files takes too long. Is there a quicker way? Is there a way to ask the user to enter the folder where the file is located (like the browse dialog box)? Thanks. Bill |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding a Workbook's Location
You could use a macro that opens the File|Open dialog to get the name of an
existing file. Dim myFileName as Variant myfilename=application.getopenfilename("excel files, *.xls") if myfilename=false then 'user hit cancel 'do something else msgbox myfilename 'do whatever you need with that variable end if === If you're really just looking for a folder name from the user... Jim Rech has a BrowseForFolder routine at: http://www.oaltd.co.uk/MVP/Default.htm (look for BrowseForFolder) John Walkenbach has one at: http://j-walk.com/ss/excel/tips/tip29.htm If you and all your users are running xl2002+, take a look at VBA's help for: application.filedialog(msoFileDialogFolderPicker) Bill wrote: Hello, I would like to find a workbooks on the C directory, but searching all files takes too long. Is there a quicker way? Is there a way to ask the user to enter the folder where the file is located (like the browse dialog box)? Thanks. Bill -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Finding a cell location | New Users to Excel | |||
Finding the Location within an Array | Excel Worksheet Functions | |||
Finding the location of what was summed | Excel Worksheet Functions | |||
Finding the location of MAX value in column | Excel Discussion (Misc queries) | |||
vba...finding location of number | Excel Programming |