Code:
Sub M_snb()
Dim a As Variant
a = InputBox("search here")
sn = Split(CreateObject("wscript.shell").exec("cmd /c Dir ""E:\YY\*.jpeg"" /s /a /b").stdout.readall, vbCrLf)
Sheets(1).Cells(1).Resize(UBound(sn) + 1) = Application.Transpose(sn)
End Sub
in this code i want to add a value of "a" (inputbox) instead of * and in the last mean before end sub i need a hyperlink of locations of file in the B column( hyperlink of a column)
Last edited by a moderator: