I did that, I get an error on the xlInsideHorizontal Line. When I take the last two lines out, it runs fine, but I get one big border around the entire range.
>>I understand the use of ranges (I think). The problem is that you don't get fully formed boxes when you use a range. The only way I could get it to work was loop through each cell succesively setting the form for all four sides.
>>
>>The command .Borders(xlHorizontalInside).LineStyle = xlContinuous and
>>.Borders(xlHorizontalInside).LineStyle = xlContinuous both gave me an error when used with the range. Without them, you just get 2 vertical lines....not horizontal. If you set a range like your suggesting, you get a border around the entire range, not around each cell.
>
>Try this:
>
>WITH oSheet.UsedRange
> .Borders(xlEdgeTop).LineStyle = xlContinuous
> .Borders(xlEdgeLeft).LineStyle = xlContinuous
> .Borders(xlEdgeRight).LineStyle = xlContinuous
> .Borders(xlEdgeBottom).LineStyle = xlContinuous
> .Borders(xlInsideHorizontal).LineStyle = xlContinuous
> .Borders(xlInsideVertical).LineStyle = xlContinuous
>ENDWITH
>