Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have some code that extract file paths and lists them in Sheet1 (rows1 thru
whatever many they may be). The issue is, recently it lists them all in lower case (paths in lowercase) instead of like before proper case as you see it on Address bar of the folder. The other issue is, sometime when I hit the find button, I get the message €˜No files found and I know they are there (at which case Id have to restart the computer to avoid this message). Does anyone have any idea as to why these two strange behaviors happen recently? Thanks for any help provided, Adnan |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here's the code Nigel,
Sub SearchFiles() Dim stPath As String Dim fnr As Long Dim c As Long 'Search for files: Set fs = Application.FileSearch Sheets("Sheet1").Select Range("A6:B5000").ClearContents stPath = Trim(Cells(1, 2).Value) With fs .LookIn = stPath .Filename = "*.xls" .SearchSubFolders = False c = 6 If .Execute() 0 Then For i = 1 To .FoundFiles.Count Cells(c, 2).Value = .FoundFiles(i) fnr = .FoundFiles.Count Cells(5, 3).Value = fnr c = c + 1 Next i Else MsgBox "No Files Found" Cells(5, 3).Value = 0 End If End With Application.Calculation = xlCalculationAutomatic End Sub The thing is, I think it is not the code since it was okay few days ago. Thanks for you help, Adnan "Nigel" wrote: Without the code it is difficult to analyse! -- Regards, Nigel "Adnan" (donotspam) wrote in message ... I have some code that extract file paths and lists them in Sheet1 (rows1 thru whatever many they may be). The issue is, recently it lists them all in lower case (paths in lowercase) instead of like before proper case as you see it on Address bar of the folder. The other issue is, sometime when I hit the find button, I get the message €˜No files found and I know they are there (at which case Id have to restart the computer to avoid this message). Does anyone have any idea as to why these two strange behaviors happen recently? Thanks for any help provided, Adnan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using UNC path instead of URL to link cell to PDF file | Excel Worksheet Functions | |||
Formula too long - new file path is shorter than old file path - Excel 2003 | Excel Worksheet Functions | |||
How do I add a month to a filename extracted from a cell | Excel Programming | |||
Can delimited text file imports be extracted to a single column i. | Excel Discussion (Misc queries) | |||
Save file path in cell | Excel Programming |