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: 422
Default Help in Modification of existing code

The following code to perform quite well with the exception that it is
Occasionally **Duplicating** certain (several) files in the listing, as
follows:
c:\windows\desktop\temp excel formulas\CountIf_Array_Usage.xls
c:\windows\desktop\Temp excel formulas\CountIf_Array_Usage.xls
c:\windows\desktop\temp excel formulas\CountIf_Array_Usage.xls

Any clues as to what's going on and how to eliminate duplication?
TIA,
JMay


Sub listthefiles()
Set fs = Application.FileSearch
With fs
..LookIn = "C:\Windows\Desktop\Temp Excel Formulas"
..Filename = "*.xls"
If .Execute 0 Then
ActiveCell = Range("A2")
For I = 1 To .FoundFiles.Count
ActiveCell.FormulaR1C1 = .FoundFiles(I)
ActiveCell.Offset(1, 0).Select
Next I
Else
End If
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
modification to this code James Excel Discussion (Misc queries) 0 March 23rd 09 09:20 PM
Code modification help AndyMP Excel Worksheet Functions 1 February 8th 09 11:41 PM
Need Help with macro code modification HM Excel Programming 3 February 12th 04 12:41 AM
Sort Code Modification Todd Huttenstine\(Remote\) Excel Programming 1 November 27th 03 08:18 AM
Modification to code Peter Atherton Excel Programming 1 September 23rd 03 07:36 PM


All times are GMT +1. The time now is 03:01 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"