Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
automatic [email protected] uk Excel Discussion (Misc queries) 1 June 20th 09 07:19 PM
Automatic update of spreadsheet & automatic update between workboo Losva Excel Worksheet Functions 6 September 12th 08 03:22 PM
Automatic Value Dave Excel Discussion (Misc queries) 1 December 11th 06 09:51 PM
auto fit row heigth Randy Starkey Excel Programming 6 March 23rd 05 12:09 AM
automatic row Ralph Excel Programming 1 February 28th 05 04:48 PM


All times are GMT +1. The time now is 11:34 PM.

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

About Us

"It's about Microsoft Excel"