mturner737
New Member
- Joined
- Aug 7, 2013
- Messages
- 2
Hello,
I am trying to write VBA code that will open a file with the following name:
"Price Overrides"
However, sometimes the name of this file is "Price Overrides-1", or "Price Overrides-2" depending on when I lasted open/closed my browser/excel which can be hard to keep track of sometimes. So, I am looking for a VBA code that will essentially loop until the file is opened and then end. Kind of life a large "IF THEN ELSE" sequence.
So it would be like...
Open file "Price Overrides" If found then end sequence ELSE Open file "Price Overrides-1" if "Price-Overrides-1" is found then end sequnce else open file "Price Overrides-2" and so on and so on...
Can someone please help with this?
Thanks,
Matt
I am trying to write VBA code that will open a file with the following name:
"Price Overrides"
However, sometimes the name of this file is "Price Overrides-1", or "Price Overrides-2" depending on when I lasted open/closed my browser/excel which can be hard to keep track of sometimes. So, I am looking for a VBA code that will essentially loop until the file is opened and then end. Kind of life a large "IF THEN ELSE" sequence.
So it would be like...
Open file "Price Overrides" If found then end sequence ELSE Open file "Price Overrides-1" if "Price-Overrides-1" is found then end sequnce else open file "Price Overrides-2" and so on and so on...
Can someone please help with this?
Thanks,
Matt