Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default File path extracted to the cell in lowercase and sometimes it does

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default File path extracted to the cell in lowercase and sometimes it

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
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
Using UNC path instead of URL to link cell to PDF file Francisco Excel Worksheet Functions 2 May 24th 07 10:30 PM
Formula too long - new file path is shorter than old file path - Excel 2003 Greg J Excel Worksheet Functions 1 November 22nd 06 05:16 PM
How do I add a month to a filename extracted from a cell Geoff Excel Programming 4 April 30th 06 04:39 PM
Can delimited text file imports be extracted to a single column i. JROD Excel Discussion (Misc queries) 1 April 1st 05 05:57 AM
Save file path in cell Jim Melchers Excel Programming 1 September 19th 03 11:36 PM


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