Well, that is odd... I've used that code for ages :-/

What version of Excel are you using?