Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Folks, Am using the following macro to wrap text in merged cells - unmerges,
wraps, set's height and remerges in essence. For some reason is has stopped working - any ideas as I am completely stumped!!!! No error messages either. Thanks / Nick Dim CurrentRowHeight As Single, MergedCellRgWidth As Single Dim CurrCell As Range Dim ActiveCellWidth As Single, PossNewRowHeight As Single ActiveSheet.Unprotect Password:="ericsson" Selection.RowHeight = 12.75 If ActiveCell.MergeCells Then With ActiveCell.MergeArea If .Rows.Count = 1 And .WrapText = True Then Application.ScreenUpdating = False CurrentRowHeight = .RowHeight ActiveCellWidth = ActiveCell.ColumnWidth For Each CurrCell In Selection MergedCellRgWidth = CurrCell.ColumnWidth + MergedCellRgWidth Next .MergeCells = False .Cells(1).ColumnWidth = MergedCellRgWidth .EntireRow.AutoFit PossNewRowHeight = .RowHeight .Cells(1).ColumnWidth = ActiveCellWidth .MergeCells = True .RowHeight = IIf(CurrentRowHeight PossNewRowHeight, _ CurrentRowHeight, PossNewRowHeight) End If Selection.Locked = False Selection.FormulaHidden = False Call ProtectStatusReportWithPassword End With End If |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Wrap text in merged cells VBA | Excel Discussion (Misc queries) | |||
Merged cells/wrap text | Excel Discussion (Misc queries) | |||
merged cells and wrap text | Excel Discussion (Misc queries) | |||
text wrap in merged cells | Excel Discussion (Misc queries) | |||
text wrap w/ merged cells | Excel Discussion (Misc queries) |