
file list box problem across network drives
Hi,
A recap on my problem.
I have a standard file list box and in my code I do :-
FileList1.Path = source_dir
FileList1.Refresh
If FileList1.ListCount > 0 Then
' do xyz
End If
As expected this works fine on my local hard disk but if the files are
actually on a network drive then the ListCount returns zero and
nothing is displayed in the box even though there is actually files in
the directory when viewed with Explorer.
At first I thought this was some kind of latency problem so I tried
using the DoEvents function but to no avail.
However I found that Mystring = Dir(source_dir, vbNormal) returned the
files from the directory so that proved it wasn't a latency problem.
So after a bit of investigation I found it's something to do with
length of string used to set FileList1.Path
For Example
if I use something like source_dir = "t:\abc\def\ghi\jkl" then
everything is fine
but if I use source_dir = "t:\myproject_1\project_data" then the file
list box doesn't see the directory contents.
I'll have to suss out what the actual limits are but why does this
only affect network drives , has anyone ever seen this
before?????????????????????????
regards
Ian Birbeck