Yachrishere
New Member
- Joined
- May 6, 2019
- Messages
- 6
Hi.
I am looking for a way to open a work book that is in a constantly named folder but the name may alter.
i.e. Roof V4.1.xlsm but a later version could be Roof V5.6.xlsm
The path to the folder won't change, just the file name.
I have tried to make it a string so I can use a wild card but it doesn't recognise it as I get a run time error 1004.
I am looking for a way to open a work book that is in a constantly named folder but the name may alter.
i.e. Roof V4.1.xlsm but a later version could be Roof V5.6.xlsm
The path to the folder won't change, just the file name.
I have tried to make it a string so I can use a wild card but it doesn't recognise it as I get a run time error 1004.
Code:
MyFile = Dir("\Roof V*")
Workbooks.Open Filename:=(ActiveSheet.Range("E11").Value & "\Quoting Files" & MyFile)
[Code]
Cell E11 has the path so it's value works, then the folder "\Quoting Files" is correct but it wont accept [U]MyFile
[/U]Any help on this would be greatly appreciated.