Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automatic row heigth
I have a macro that if entries exceed merged width of columns F thru K, row will automatically heigthen & wrap text. Problem is that when a number or letter is entered in column L, columns F thru K convert back to original heigth without any wrap & row heigthen. Here is my Macro: Private Sub Worksheet_Change(ByVal Target As Range) Dim NewRwHt As Single Dim cWdth As Single, MrgeWdth As Single Dim r As Range, c As Range, cc As Range Dim ma As Range Set r = Range("f12:k321", "v12:x321") If Not Intersect(Target, r) Is Nothing Then Set c = Target.Cells(1, 1) cWdth = c.ColumnWidth Set ma = c.MergeArea For Each cc In ma.Cells MrgeWdth = MrgeWdth + cc.ColumnWidth Next Application.ScreenUpdating = False ma.MergeCells = False c.ColumnWidth = MrgeWdth c.EntireRow.AutoFit NewRwHt = c.RowHeight c.ColumnWidth = cWdth ma.MergeCells = True ma.RowHeight = NewRwHt cWdth = 0: MrgeWdth = 0 Application.ScreenUpdating = True End If End Sub -- Jack Wood ------------------------------------------------------------------------ Jack Wood's Profile: http://www.thecodecage.com/forumz/member.php?userid=346 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=113449 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automatic row heigth
I'm still looking for some help on this one. No replys yet. Does anyone have a fix. Thanks. -- Jack Wood ------------------------------------------------------------------------ Jack Wood's Profile: http://www.thecodecage.com/forumz/member.php?userid=346 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=113449 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
automatic | Excel Discussion (Misc queries) | |||
Automatic update of spreadsheet & automatic update between workboo | Excel Worksheet Functions | |||
Automatic Value | Excel Discussion (Misc queries) | |||
auto fit row heigth | Excel Programming | |||
automatic row | Excel Programming |