So I've been messing around with a code that opens another file in the same folder as my sheet. I was wondering if it was possible to use a wildcard when opening the file.
This is the code I'm using, it's been stitched together from other things I've seen online so I'm not going to say I'm any expert on how to use ".Open" to it's full effect but I know it works when I don't use the wildcard and just have the film name in fully.
I've had a few thoughts on why it's coming up with "application undefined error." but other than randomly experimenting I've got no real ideas, can anyone point me in the right direction?
Also, if I do get this code working, what would happen in the case of two files being similar, but one ends in something like "...Rev 8" and the other in "...Rev 17" What would it go for then, or would it open both?
This is the code I'm using, it's been stitched together from other things I've seen online so I'm not going to say I'm any expert on how to use ".Open" to it's full effect but I know it works when I don't use the wildcard and just have the film name in fully.
I've had a few thoughts on why it's coming up with "application undefined error." but other than randomly experimenting I've got no real ideas, can anyone point me in the right direction?
Code:
Sub test()
Dim CertFile As Workbook
Set CertFile = Workbooks.Open(ThisWorkbook.Path & "\1635-01-00 Rev*", False)
End Sub
Also, if I do get this code working, what would happen in the case of two files being similar, but one ends in something like "...Rev 8" and the other in "...Rev 17" What would it go for then, or would it open both?