I am looking for a way to get hidden files fron
a folder and then list them in a listbox control.
Could someone help me with this?
this is the code i got so far:
Sub hidden(path As String, list As ListBox) mypath = path MyName = Dir(mypath, vbHidden) Do While MyName <> "" If MyName <> "." And MyName <> ".." Then If (GetAttr(mypath & MyName) And vbHidden) = vbHidden Then list.AddItem mypath & MyName End If End If MyName = Dir Loop End Sub
but i get an error with this code, what do i have wrong?
Thanks in advance