#1   Report Post  
Posted to microsoft.public.excel.programming
ojv ojv is offline
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
jaf jaf is offline
external usenet poster
 
Posts: 300
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
File Path Too Long? Not Anymore! Check out Long Path Tool Max Loger Excel Discussion (Misc queries) 1 March 24th 17 07:59 AM
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 Max Loger Excel Discussion (Misc queries) 0 June 14th 11 04:30 PM
Formula too long - new file path is shorter than old file path - Excel 2003 Greg J Excel Worksheet Functions 1 November 22nd 06 05:16 PM
hyperlink navigation path path wrong in Excel 2003 CE Admin Excel Discussion (Misc queries) 5 January 7th 06 07:47 PM
how to change absolute path to relative path hwijgerse Excel Worksheet Functions 0 November 25th 05 07:18 AM


All times are GMT +1. The time now is 01:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"