TOOLBAR button or Keyboard Shortcut FOR Center Across Selectio
That could be the macro that I was suggesting, although I wouldn't be so
profligate as to repeat Selection <g
Sub TOGGLECENTERACROSS()
With Selection
If .HorizontalAlignment = xlCenterAcrossSelection Then
.HorizontalAlignment = xlGeneral
Else
.HorizontalAlignment = xlCenterAcrossSelection
End If
End With
End Sub
But I was thinking of a more basic macro, not a toggle
Sub CentreAcrossSelection()
Selection.HorizontalAlignment = xlCenterAcrossSelection
End Sub
--
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
"RajenRajput1" wrote in message
...
How do I do it ??
Is it the same Macro thing as Bob Phillip's response?
Kind regards,
Rajen
"Gord Dibben" wrote:
Assign this to a button.
Sub TOGGLECENTERACROSS()
With Selection
If .HorizontalAlignment = xlCenterAcrossSelection Then
.HorizontalAlignment = xlGeneral
Else
Selection.HorizontalAlignment = xlCenterAcrossSelection
End If
End With
End Sub
Gord Dibben MS Excel MVP
On Tue, 29 Apr 2008 03:59:00 -0700, RajenRajput1
wrote:
Hi,
I use Excel 2007 at work and Excel 2003 at home.
Is there a keyboard shortcut to center across selection for either of
these
versions, pref 2007?
And secondly, does anyone know if there is a toolbar button for center
across selection, or perhaps a way of placing a button on the quick
access
toolbar?
Merging cells is too easy to do and that is why I prefer it, however
formatting and selecting cells is becoming an issue with merging, and
center
across selection has it's merits, but it's time consuming.
Thank for the advice, I hope someone can help.
Regards,
Rajen
|