Hi Seamus,
I found that when I tried your code of:
Range("DCard1:DCard1a").BorderAround
it didn't do anything to the range and even after adding
(xlContinuous)
Yep, I screwed up. The LineStyle argument is required.
it only put a border around the whole selection
rather than round each cell in the selection.
Am I missing something?
The code in the original post was only surounding the entire range with
a border. If you want every cell within the range to have a border you have
to add two more lines:
With Range("DCard1:DCard1a")
.BorderAround xlContinuous
.Borders(xlInsideVertical).LineStyle = xlContinuous
.Borders(xlInsideHorizontal).LineStyle = xlContinuous
End With
--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/
* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *
"SOS " wrote in message
...
Rob,
I found that when I tried your code of:
Range("DCard1:DCard1a").BorderAround
it didn't do anything to the range and even after adding
(xlContinuous)
to the end of the line it only put a border around the whole selection
rather than round each cell in the selection.
Am I missing something?
Regards
Seamus
---
Message posted from http://www.ExcelForum.com/