LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Subject: Excel VBA .Lookin Error 9/9/2005 7:14 AM PST


Am using good code to search directory/folders for various filenames, size,
last date modified...
See code
Directory = MyPath 'custom path (MyPath = reference to specific cell's
text value)
With Application.FileSearch 'look for Excel Files
.NewSearch
.LookIn = Directory
.FileName = ".xls"
.SearchSubFolders = False
.Execute
.Count
For I = 1 To .FoundFiles.Count
Cells(r, 1) = .FoundFiles(I)
Cells(r, 2) = FileLen(.FoundFiles(I))
Cells(r, 3) = FileDateTime(.FoundFiles(I))
r = r + 1
--
My problem is that .Lookin references a folder on my harddrive instead of a
server location specified by varialble named "MyPath". Can't seem to
redirect Lookin to MyPath. Using MyPath instead of, for example:
"P:\Finance\Data\..."

Any suggestions?
Thanks,
Bryan Toma

 
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
I have a date 51231 (2005,dec,31) -I want to change to 2005/12/31 Curtis Excel Worksheet Functions 3 October 4th 06 11:38 PM
Is the equation: =COUNTIF B:B, <9/31/2005 AND 9/1/2005 possible? fireofeve Excel Worksheet Functions 4 June 6th 06 02:01 PM
Convert alphanumerical(eg. 12.11.2005) to date as 12-Nov-2005 in e Safi Excel Discussion (Misc queries) 3 June 1st 06 04:35 PM
error after runing MS update last weel 10/13/2005 Quan Excel Discussion (Misc queries) 0 October 17th 05 05:42 PM
chnage date from tuesday 4 January 2005 10:39.26 to 04/01/2005 Jonny1975 Excel Worksheet Functions 1 June 6th 05 10:13 AM


All times are GMT +1. The time now is 07:38 PM.

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

About Us

"It's about Microsoft Excel"