Excel VBA Macro to Apply Border Around or Outsider Border to the Selection
The following simple macros shows the setting borders to the section of cells.
Sub BorderAround()
Selection.BorderAround , ColorIndex:=xlAutomatic, Weight:=xlMedium
'For Thin Border
'Selection.BorderAround , ColorIndex:=xlAutomatic, Weight:=xlThin
'For Thick Border
'Selection.BorderAround , ColorIndex:=xlAutomatic, Weight:=xlThick
End Sub
The following simple macros shows the setting borders to the section of cells.
Sub BorderAround()
Selection.BorderAround , ColorIndex:=xlAutomatic, Weight:=xlMedium
'For Thin Border
'Selection.BorderAround , ColorIndex:=xlAutomatic, Weight:=xlThin
'For Thick Border
'Selection.BorderAround , ColorIndex:=xlAutomatic, Weight:=xlThick
End Sub
Example :
Macro to Change the Border Styles :
Sub CellsBorderStyles()
Selection.Borders.LineStyle = xlContinuous
End Sub
Thanks, TAMATAM
No comments:
Post a Comment
Hi User, Thank You for visiting My Blog. Please post your genuine Feedback or comments only related to this Blog Posts. Please do not post any Spam comments or Advertising kind of comments which will be Ignored.