Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Path
Hi,
Is there a way to retrieve programmatically the path to the XLUSRGAL.XLS workbook which Excel generate to store custom made plot formats? any help appreciated! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Path
Hi,
If the file is open then... MyPath=workbooks("XLUSRGAL.XLS").path If it's closed you can do a filesearch, but opening it may be faster. From help. Use the Execute method to begin the file search and update the FoundFiles object. The following example searches the My Documents folder for all files whose names begin with "Cmd" and displays the name and location of each file that's found. The example also sorts the returned files in ascending alphabetic order by file name. Set fs = Application.FileSearch With fs .LookIn = "C:\My Documents" .FileName = "cmd*" If .Execute(SortBy:=msoSortbyFileName, _ SortOrder:=msoSortOrderAscending) 0 Then MsgBox "There were " & .FoundFiles.Count & _ " file(s) found." For i = 1 To .FoundFiles.Count MsgBox .FoundFiles(i) Next i Else MsgBox "There were no files found." End If End With -- John johnf202 at hotmail dot com "ojv" wrote in message ... Hi, Is there a way to retrieve programmatically the path to the XLUSRGAL.XLS workbook which Excel generate to store custom made plot formats? any help appreciated! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
File Path Too Long? Not Anymore! Check out Long Path Tool | Excel Discussion (Misc queries) | |||
http://CannotDeleteFile.net - Cannot Delete File? Try Long Path ToolFilename is too long? Computer Complaining Your Filename Is Too Long? TheLong Path Tool Can Help While most people can go about their businessblissfully unaware of the Windo | Excel Discussion (Misc queries) | |||
Formula too long - new file path is shorter than old file path - Excel 2003 | Excel Worksheet Functions | |||
hyperlink navigation path path wrong in Excel 2003 | Excel Discussion (Misc queries) | |||
how to change absolute path to relative path | Excel Worksheet Functions |