#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically merge mulitiple cells to one cells Edward Wang Excel Worksheet Functions 5 September 15th 09 07:56 PM
how do I merge cells into one then delete the original cells? LLR Excel Worksheet Functions 2 March 7th 08 10:59 PM
How do I merge cells in Excel, like just 2 cells to make one big . chattacat Excel Discussion (Misc queries) 2 January 19th 05 04:25 PM
fill cells, merge cells porkie[_5_] Excel Programming 0 September 23rd 04 05:18 AM
fill cells, merge cells porkie Excel Programming 1 September 21st 04 07:06 AM


All times are GMT +1. The time now is 01:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"