If I were going to do it more than once, sure. Otherwise it's a waste of time. Writing a keyboard macro is simple and quick, much quicker than even your 3 lines of code.