Hi all,
I have a macro I created to add boarders around a table shown below.
The last line
Sub Boxit()
'
' Boxit Macro
'
'
With Selection
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
.Borders.LineStyle = xlNone
.Borders.Weight = xlThin
.BorderAround Weight:=xlThick
End With
End Sub
Cheers Clive
I have a macro I created to add boarders around a table shown below.
The last line
BorderAround Weight:=xlThick makes the last cell of the worksheet one cell below the last one actually used. I cannot clear this. of I change it to
BorderAround Weight:=xlThin it works fine but the table does not look as good. If I select the table and use the thick boarder icon it works fine.
Can anybody please explain why this happens.
I does not matter most of the time but I have other macros that need to find the last cell used which makes them not work they find the incorrect last cell. I have tried utilities which reset the last cell but they also don't work.
So I need some help.
Can anybody please explain why this happens.
I does not matter most of the time but I have other macros that need to find the last cell used which makes them not work they find the incorrect last cell. I have tried utilities which reset the last cell but they also don't work.
So I need some help.
Sub Boxit()
'
' Boxit Macro
'
'
With Selection
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
.Borders.LineStyle = xlNone
.Borders.Weight = xlThin
.BorderAround Weight:=xlThick
End With
End Sub
Cheers Clive
Last edited: