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: 9
Default update file list code for excel 2007

I just switch from Windows XP to Windows 2007 and I'm no longer able to run
this macro.
Can you help me...
Thanks
-----------------------------------------------

Sub ListFiles_01()
'Using FileSearch to list the files in a directory
Dim i As Integer
i = 1
With Application.FileSearch 'This is the problem'
..NewSearch
..LookIn = "C:\"
..Filename = "*.*"
.SearchSubFolders = True
'.SearchFolders = True
..Execute
For i = 1 To .FoundFiles.Count
Range("B" & i + 1).Value = .FoundFiles(i)
Range("C" & i + 1).Value = FileDateTime(.FoundFiles(i))
Range("D" & i + 1).Value = FileLen(.FoundFiles(i))
'Range("E" & i + 1).Value = Filename(.FoundFiles(i))
Next


End With


End Sub


 
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
want to record date for each time I update a file - Excel 2007 PattyR Excel Discussion (Misc queries) 2 June 3rd 09 08:18 PM
Excel 2007 protected file corrupt after update chris l Excel Discussion (Misc queries) 4 January 3rd 08 11:41 PM
Excel cell can't update link in the file in sharepoint 2007 [email protected] Links and Linking in Excel 0 January 3rd 08 12:11 AM
Update back to shaprepoint list from dowloaded Excel file Amitabh Excel Discussion (Misc queries) 0 September 21st 07 09:24 AM
Excel 2007 - Sharpoint 2003 can't update list on server Michael Price Excel Discussion (Misc queries) 3 February 26th 07 03:43 PM


All times are GMT +1. The time now is 11:59 AM.

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"