The VBA code
lists in turn all the "normal" files from within my_folder, where "normal" means "without attributes". Now replacing vbNormal by vbHidden, the above code should list not only the normal, but also the hidden files as well. However, the two options only list normal files and the same result occurs if using vbReadOnly or vbSystem options instead of vbNormal: only normal files are listed although all my system settings do allow complete visibility of files.
Could anybody please explain me how to obtain a completely functional Dir(my_folder, *) function as promissed by VBA?
Thanks in advance!
------------------------------
P.S.1 The shell command Dir does work as expected. For instance, Dir /A:H does list all the hidden files, etc.
P.S.2 I'm working with Excel 2007, under Win XP SP2
Code:
Dim item as String
item = Dir(my_folder, vbNormal)
Do While item <> ""
MsgBox item
item = Dir
Loop
Could anybody please explain me how to obtain a completely functional Dir(my_folder, *) function as promissed by VBA?
Thanks in advance!
------------------------------
P.S.1 The shell command Dir does work as expected. For instance, Dir /A:H does list all the hidden files, etc.
P.S.2 I'm working with Excel 2007, under Win XP SP2