Guys -
I am trying to open .vis file using wild cards. The wild card is not working for one particular scenario.
The below code is working fine if the File Name is Trial.vis. But, it will not work if the file name is Trial_RE.vis. (However, for .xlsx, it works fine for both the scenarios)
I am trying to open .vis file using wild cards. The wild card is not working for one particular scenario.
The below code is working fine if the File Name is Trial.vis. But, it will not work if the file name is Trial_RE.vis. (However, for .xlsx, it works fine for both the scenarios)
Code:
fPath = InputBox("What is the folder path?", "Path", ThisWorkbook.Path)
If fPath = "" Then Exit Sub
If Right(fPath, 1) <> "\" Then
fPath = fPath & "\"
End If
vFile = Dir(fPath & "*Trial*.vis")
Workbooks.Open Filename:=vFile
Set wbCopyFrom = Workbooks.Open(vFile)