LogicAli's code in post #11 worked perfectly first time when I tried it.
Did you copy/paste it or type it in?
To get usable copyable code from this silly forum, hit the "Quote" button on post #11 and then copy from the edit window that quotes the code.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.