As Paul has shown, the macro can be a single line of code. I included the extra lines to try to avoid possible errors should the object not exist or perhaps not be selectable.
Coding in Excel can also be written in few lines if you are happy to deal with errors when something unforeseen causes a problem.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
|