Hi,
Nice one Aroon
Here is an alternative solution which I picked up several years ago:
<PRE>
<FONT color=blue>Private <FONT color=blue>Sub </FONT></FONT>Worksheet_SelectionChange(<FONT color=blue>ByVal</FONT> Target<FONT color=blue> As</FONT> Range)
<FONT color=#ff0000>'Original created by Jim Rech
</FONT>
<FONT color=blue>Set </FONT>Target = Range("A1:A10")
<FONT color=blue>If </FONT>Intersect(ActiveCell, Target) Is<FONT color=blue> Nothing</FONT><FONT color=blue> Then </FONT><FONT color=blue>Exit Sub</FONT>
<FONT color=blue>Dim </FONT>snCurrRowH<FONT color=blue> As</FONT><FONT color=blue> Single</FONT>, MergedCellRgWidth<FONT color=blue> As</FONT><FONT color=blue> Single</FONT>
<FONT color=blue>Dim </FONT>CurrCell<FONT color=blue> As</FONT> Range
<FONT color=blue>Dim </FONT>ActiveCellWidth<FONT color=blue> As</FONT><FONT color=blue> Single</FONT>, PossNewRowHeight<FONT color=blue> As</FONT><FONT color=blue> Single</FONT>
<FONT color=blue>Dim </FONT>stCell<FONT color=blue> As</FONT><FONT color=blue> String</FONT>
<FONT color=blue>With </FONT>ActiveCell.MergeArea
<FONT color=blue>If </FONT>.Rows.Count = 1 And .WrapText =<FONT color=blue> True</FONT> Then
Application.ScreenUpdating =<FONT color=blue> False</FONT>
snCurrRowH = .RowHeight
ActiveCellWidth = ActiveCell.ColumnWidth
<FONT color=blue>For </FONT>Each CurrCell In Selection
MergedCellRgWidth = CurrCell.ColumnWidth + _
MergedCellRgWidth
Next
.MergeCells =<FONT color=blue> False</FONT>
.Cells(1).ColumnWidth = MergedCellRgWidth
.EntireRow.AutoFit
PossNewRowHeight = .RowHeight
.Cells(1).ColumnWidth = ActiveCellWidth
.MergeCells =<FONT color=blue> True</FONT>
.RowHeight = IIf(snCurrRowH > PossNewRowHeight, _
snCurrRowH, PossNewRowHeight)
<FONT color=blue>End If</FONT>
<FONT color=blue>End With</FONT>
<FONT color=blue>End Sub</FONT>
</PRE>
Do get it to work as it is above uncheck "Move selection after Enter".
Kind regards,
Dennis