Thursday, May 19, 2011

Adding horizontal/vertical borders to an Excel range selection

I'm cracking my head against another piece of Excel's AppleScript enabled functions.

What I seek to do is turn this












into this













This is part of a larger script and I need to add borders to every cell in the used range. I am really pulling my hair out trying to track down exactly where Excel assigns this property and how to address it's parent object. So far all I have managed to do is add a border around an entire range using...get this...the border around call, but I cannot seem to hit all the horizontal and vertical borders in-between cells.

Does anyone out there have a snippet of code that can handle this succinctly?

No comments:

Post a Comment