' Collection of code snippets by Arne Vajhøj 
' (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
Function Lookup(location As String)
    Dim e As String
    e = Dir(location, vbDirectory)
    While e <> ""
        If GetAttr(location & e) And vbDirectory Then
            MsgBox (e & " is a directory")
        Else
            MsgBox (e & " is a file")
        End If
        e = Dir()
    Wend
End Function

Function testlookup()
    Lookup ("C:\code\")
End Function
