![]() |
MERGE CELLS
HI,
I WANT TO MERGE CELLS A2:A3 AND THEN ALIGN THR TEXT INSIDE VERTICALLY AND HORIZONTALLY CENTERED. Range("A2:A3").MergeCells = True ActiveSheet.Cells(2, 1).HorizontalAlignment = xlCenter ActiveSheet.Cells(2, 1).VerticalAlignment = xlVAlignCenter THE CODE ABOVE DOES NOTHING. CAN ANYBODY HELP ME? THANKS |
MERGE CELLS
SORRY,
I FOUND MYSELF: ActiveSheet.Cells(2, 1).HorizontalAlignment = xlCenter ActiveSheet.Cells(2, 1).VerticalAlignment = xlVAlignCenter Range("A2:A3").MergeCells = True "ermeko" wrote: HI, I WANT TO MERGE CELLS A2:A3 AND THEN ALIGN THR TEXT INSIDE VERTICALLY AND HORIZONTALLY CENTERED. Range("A2:A3").MergeCells = True ActiveSheet.Cells(2, 1).HorizontalAlignment = xlCenter ActiveSheet.Cells(2, 1).VerticalAlignment = xlVAlignCenter THE CODE ABOVE DOES NOTHING. CAN ANYBODY HELP ME? THANKS |
MERGE CELLS
Try:-
Sub testttt() Range("A2:A3").Select With Selection .Merge .HorizontalAlignment = xlCenter .VerticalAlignment = xlVAlignCenter End With End Sub HTH "ermeko" wrote in message ... HI, I WANT TO MERGE CELLS A2:A3 AND THEN ALIGN THR TEXT INSIDE VERTICALLY AND HORIZONTALLY CENTERED. Range("A2:A3").MergeCells = True ActiveSheet.Cells(2, 1).HorizontalAlignment = xlCenter ActiveSheet.Cells(2, 1).VerticalAlignment = xlVAlignCenter THE CODE ABOVE DOES NOTHING. CAN ANYBODY HELP ME? THANKS |
All times are GMT +1. The time now is 06:32 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com