Quote Originally Posted by xltrader100
How would I test the one liner for success/failure?
[VBA]
Sub M_snb()
sn = filter(Split(CreateObject("wscript.shell").exec("cmd /c Dir C:\Projectfolder\*. /b /s").stdout.readall, vbCrLf),activecell.value)
if ubound(sn)>-1 then msgbox sn(0)
End Sub
[/VBA]