Some questions about Borders in Excel 2007

J

joshua.mayer

1. Is it possible in some way to "undock" the borders button from the
ribbon, similar to how I was able to do in Excel 2003?
2.. Is there a way to create my prest border button (for example, I'd
like a group of cells to have thin internal borders but a thick line
for an external border around the whole group)? I'd prefer it to be a
non-macro solution so it's something that's available in every
workbook that I open/create. Also, I'm not that good with macros so
unless it's done completely for me...I have no clue! :)

Thanks for any help in advance!
 
H

Harlan Grove

(e-mail address removed) wrote...
1. Is it possible in some way to "undock" the borders button from
the ribbon, similar to how I was able to do in Excel 2003?

No. Microsoft in its infinite wisdom knows how you should use its
software. Get used to it.
2.. Is there a way to create my prest border button (for example,
I'd like a group of cells to have thin internal borders but a thick
line for an external border around the whole group)? I'd prefer it
to be a non-macro solution so it's something that's available in
every workbook that I open/create. Also, I'm not that good with
macros so unless it's done completely for me...I have no clue! :)

What you want requires macros in every version of Excel. If you put
the macro in your Personal.xls workbook, it'd be available in every
workbook. The macro itself would look like


Sub setborders()
Dim a As Variant, b As Variant, i As Variant

a = Array(xlEdgeLeft, xlEdgeTop, xlEdgeBottom, xlEdgeRight)
b = Array(xlInsideVertical, xlInsideHorizontal)

For Each i In a
With Selection.Borders(i)
.LineStyle = xlContinuous
.Weight = xlThick
.ColorIndex = xlAutomatic
End With
Next i

For Each i In b
With Selection.Borders(i)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Next i

End Sub


If you don't have a Personal.xls workbook, create a new, blank
workbook, switch to the VB Editor by pressing [Alt]+[F11], run the
menu command Insert > Module to create a general module, paste the
code above into that module, switch back to Excel by pressing [Alt]+
[F11] again, save the workbook as Personal.xls. You'll need to move
Personal.xls to the directory from which Excel loads all files on
start-up. That's an individual user setting, so you'll need to check
what that is on your system by going through Excel 2007's options
menu. Once you've done this, you could add a macro button to your QAT
that runs this macro.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top