![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: May 2002
Location: Tennessee, USA
Posts: 72
|
I am using the following code :->
Dim Fso, F Set Fso = CreateObject("Scripting.FileSystemObject") Set F = Fso.GetFile("C:\filename.xls") LastMod = F.DateLastModified ...to determine when the "C:filename.xls" program file was last modified. For the "GetFile" parameter, is there any way to use a general expression so that I don't have to list the full, exact file path? I am using a diskette to move this program to multiple computers so I can continue to develop it and the exact file path varies from computer to computer. In order for the macro to operate properly, I am having to edit this line of code every time I use a different computer. [ This Message was edited by: WayneTN on 2002-05-14 10:05 ] [ This Message was edited by: WayneTN on 2002-05-18 18:11 ] |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
|
Hi,
Try the following and see which one works for you. ThisWorkbook.FullName ThisWorkbook.Path The .FullName includes the file name, while the .Path option excludes it. Bye, Jay |
|
|
|
|
|
#3 | |
|
Board Regular
Join Date: May 2002
Location: Tennessee, USA
Posts: 72
|
Quote:
Thanks again for the help. This is a great forum! |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|