View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
ShaneDevenshire ShaneDevenshire is offline
external usenet poster
 
Posts: 2,344
Default Combine two predefined borders

Hi,

You will need to use VBA:

Sub MyBorders()
On Error Resume Next
With Selection
.Borders(xlEdgeLeft).Weight = xlMedium
.Borders(xlEdgeTop).Weight = xlMedium
.Borders(xlEdgeBottom).Weight = xlMedium
.Borders(xlEdgeRight).Weight = xlMedium
.Borders(xlInsideVertical).Weight = xlThin
.Borders(xlInsideHorizontal).Weight = xlThin
End With
End Sub

You might put this in the personal macro workbook so its available for all
workbooks. You can assign a shortcut key and your set.
--
Cheers,
Shane Devenshire


"sammy" wrote:

Hi All,

I'm using MS Office 2007; on the Home tab of the ribbon, on the Font panel,
there is a button to add borders around cells. This button has several
predefined options and i use two alot, i mean really, alot. They are "All
Borders" and "Thick Box Border".

I find that very often i first apply the All Borders and then immediately
apply Thick Box Border. This gives me a thick box around a range of cells
with thin line borders.

Is there a way to define my own border that can give me this result with
only one pick?

Thanks,
Sammy