Although they do almost the same thing, Pascals code is better, but glad to have helped.

With / End With can save a lot of typing! See here for more details.