dear all,
I have macros code below
Sub openfile()
Dim sSrcFolder As String, sFilename As String Dim c As Range, rPatterns As Range
sSrcFolder = Range("F1")
Set rPatterns = ActiveCell.Offset(0, 0)
For Each c In rPatterns
sFilename = Dir(sSrcFolder & "*" & c.Text & "*")
If sFilename = "" Then MsgBox ("Data not found")
If sFilename <> "" Then*** Do While sFilename <> ""
Shell "ois.exe sSrcFolder & sFilename "
sFilename = Dir()
Loop
End If
Next
end sub
I want open file with clue at range a1, but the code not work.
please help to fix my code.
thx
Bookmarks