Excel 2000 UNC issue with Visual Basic
Posted 14 September 2005 - 07:34 PM
Posted 22 December 2006 - 09:43 PM
I just did a quick test using the code below;
' Macro to count number of files in a directory
' Need to test drive letter assignment vs UNC
Dim myDir As String
Dim myCounter As Integer
'myDir = "Z:\Images\" 'Z: is mapped to \\OPTIMA11\Intray\ Images is a sub directory
myDir = "\\OPTIMA11\Intray\Images\"
.LookIn = myDir
.Filename = "*.*"
If .Execute > 0 Then
Debug.Print .FoundFiles.Count & " files were found."
The code ran successfully and the result was the same for both methods of defining the directory
I am not aware of anything special you need to configure to allow UNC referencing
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users