G Guest Sep 1, 2007 #1 I would like to centre the contents in a range by using VBA. Could someone please help. Thanks
G Guest Sep 1, 2007 #2 Alan, You can do by this code: Sub Centering() With Range("a1") .HorizontalAlignment = xlCenter .VerticalAlignment = xlCenter end With End sub Type your text in A1 then run that code
Alan, You can do by this code: Sub Centering() With Range("a1") .HorizontalAlignment = xlCenter .VerticalAlignment = xlCenter end With End sub Type your text in A1 then run that code