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: 5
Default Citrix Excel VBA Search "There were no files found"

Hi,

I use a folders seach with Macros. The Search works fine on my
computer or a share drive. But the problem is it won't work on a Citrix
Share Drive?

When you run the code you get the answer "There were no files found"
there are files in the folder it's searching in.

The Code is:

Sub FindFilesXX()
Dim myPath As String
Dim lLen As Long, i As Long
Dim parts

myPath = ThisWorkbook.Path & "\Files"
With Application.FileSearch
.NewSearch
.LookIn = myPath
.SearchSubFolders = True
.Filename = "*.*"
.FileType = msoFileTypeExcelWorkbooks
ActiveSheet.Unprotect Password:="XXXXXXXXXXX"
Range("H2:I5000").Select
Selection.ClearContents
If .Execute() 0 Then
For i = 2 To .FoundFiles.Count
parts = Split(Trim(Replace(Dir(.FoundFiles(i)), ".xls", "")))
Cells(i, 8) = parts(UBound(parts))
Cells(i, 9).FormulaR1C1 = "=Hyperlink(" & Chr(34) &
..FoundFiles(i) _
& Chr(34) & ",R[0]C[-1])"
Next i
Range("i2:i2005").Select
With Selection.Font
.Name = "Arial"
.Size = 14
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
End With
Columns("h:j").Select
Selection.Sort Key1:=Range("j2"), Order1:=xlDescending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("c11").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True, Password:="XXXXXXXXXXX"
Range("C11:E11").Select
Else
Range("C11:E11").Select
MsgBox "There were no files found."
End If
End With
End Sub


Can anyone help here????

 
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
"Search for files and folders" option doesnot work for 100% ECouwenberg Excel Discussion (Misc queries) 7 January 11th 06 04:50 PM
Search for the word "continued", if found, delete that row + 10 rows above jriendeau5[_4_] Excel Programming 0 November 5th 04 03:00 PM
Search for the word "continued", if found, delete that row + 10 rows above jriendeau5 Excel Programming 1 November 5th 04 02:24 AM
Getting "compile error" "method or data member not found" on reinstall Bp Excel Programming 1 April 23rd 04 04:42 PM


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