Home |
Search |
Today's Posts |
#1
|
|||
|
|||
linked cell contents not autofitting row height
Why doesn't Excel 2002 autofit row height for text input from a linked cell?
When the linked cell contents exceed the currently viewable contents of the recipient cell the row height is not adjusted. Is there a way to make the autofit work in these circumstances? |
#2
|
|||
|
|||
Formulas don't change format and rowheight is a format.
You could use a worksheet event that resets the rowheights whenever that worksheet recalculates. If you want to try this, rightclick on the worksheet tab, select view code and paste this into the code window. Option Explicit Private Sub Worksheet_Calculate() Me.Rows.AutoFit End Sub Then back to excel and test it out. joeeng wrote: Why doesn't Excel 2002 autofit row height for text input from a linked cell? When the linked cell contents exceed the currently viewable contents of the recipient cell the row height is not adjusted. Is there a way to make the autofit work in these circumstances? -- Dave Peterson |
#3
|
|||
|
|||
Unfortunately, that recalculates the autofit for rows that should not be
recalculated and also reveals the hidden rows/columns. "Dave Peterson" wrote: Formulas don't change format and rowheight is a format. You could use a worksheet event that resets the rowheights whenever that worksheet recalculates. If you want to try this, rightclick on the worksheet tab, select view code and paste this into the code window. Option Explicit Private Sub Worksheet_Calculate() Me.Rows.AutoFit End Sub Then back to excel and test it out. joeeng wrote: Why doesn't Excel 2002 autofit row height for text input from a linked cell? When the linked cell contents exceed the currently viewable contents of the recipient cell the row height is not adjusted. Is there a way to make the autofit work in these circumstances? -- Dave Peterson |
#4
|
|||
|
|||
Is the range of rows that can be autofit known?
Option Explicit Private Sub Worksheet_Calculate() Application.EnableEvents = False Me.Range("a1:a5,a12:a15,a99:a1000").EntireRow.Auto Fit Application.EnableEvents = True End Sub Some versions of excel will recalculate when you adjust the rowheight (that's why I disabled events in this version--should have done it in the first, too.) joeeng wrote: Unfortunately, that recalculates the autofit for rows that should not be recalculated and also reveals the hidden rows/columns. "Dave Peterson" wrote: Formulas don't change format and rowheight is a format. You could use a worksheet event that resets the rowheights whenever that worksheet recalculates. If you want to try this, rightclick on the worksheet tab, select view code and paste this into the code window. Option Explicit Private Sub Worksheet_Calculate() Me.Rows.AutoFit End Sub Then back to excel and test it out. joeeng wrote: Why doesn't Excel 2002 autofit row height for text input from a linked cell? When the linked cell contents exceed the currently viewable contents of the recipient cell the row height is not adjusted. Is there a way to make the autofit work in these circumstances? -- Dave Peterson -- Dave Peterson |
#5
|
|||
|
|||
Thanks, this works, but it does seem to be interfere with the workbook
routine BeforePrint when doing print preview. Things do a lot of flashing on the status bar at the bottom of the screen. "Dave Peterson" wrote: Is the range of rows that can be autofit known? Option Explicit Private Sub Worksheet_Calculate() Application.EnableEvents = False Me.Range("a1:a5,a12:a15,a99:a1000").EntireRow.Auto Fit Application.EnableEvents = True End Sub Some versions of excel will recalculate when you adjust the rowheight (that's why I disabled events in this version--should have done it in the first, too.) joeeng wrote: Unfortunately, that recalculates the autofit for rows that should not be recalculated and also reveals the hidden rows/columns. "Dave Peterson" wrote: Formulas don't change format and rowheight is a format. You could use a worksheet event that resets the rowheights whenever that worksheet recalculates. If you want to try this, rightclick on the worksheet tab, select view code and paste this into the code window. Option Explicit Private Sub Worksheet_Calculate() Me.Rows.AutoFit End Sub Then back to excel and test it out. joeeng wrote: Why doesn't Excel 2002 autofit row height for text input from a linked cell? When the linked cell contents exceed the currently viewable contents of the recipient cell the row height is not adjusted. Is there a way to make the autofit work in these circumstances? -- Dave Peterson -- Dave Peterson |
#6
|
|||
|
|||
I'm not sure what your _beforeprint routine does, but maybe you could disable
events there, too. joeeng wrote: Thanks, this works, but it does seem to be interfere with the workbook routine BeforePrint when doing print preview. Things do a lot of flashing on the status bar at the bottom of the screen. "Dave Peterson" wrote: Is the range of rows that can be autofit known? Option Explicit Private Sub Worksheet_Calculate() Application.EnableEvents = False Me.Range("a1:a5,a12:a15,a99:a1000").EntireRow.Auto Fit Application.EnableEvents = True End Sub Some versions of excel will recalculate when you adjust the rowheight (that's why I disabled events in this version--should have done it in the first, too.) joeeng wrote: Unfortunately, that recalculates the autofit for rows that should not be recalculated and also reveals the hidden rows/columns. "Dave Peterson" wrote: Formulas don't change format and rowheight is a format. You could use a worksheet event that resets the rowheights whenever that worksheet recalculates. If you want to try this, rightclick on the worksheet tab, select view code and paste this into the code window. Option Explicit Private Sub Worksheet_Calculate() Me.Rows.AutoFit End Sub Then back to excel and test it out. joeeng wrote: Why doesn't Excel 2002 autofit row height for text input from a linked cell? When the linked cell contents exceed the currently viewable contents of the recipient cell the row height is not adjusted. Is there a way to make the autofit work in these circumstances? -- Dave Peterson -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
In Cell Validation List & Linked Cell VLOOKUP | Excel Discussion (Misc queries) | |||
cell contents | Excel Discussion (Misc queries) | |||
Adding contents of one cell to a range of cells. | Excel Worksheet Functions | |||
GET.CELL | Excel Worksheet Functions | |||
Function to operate on ink linked to cell | Excel Worksheet Functions |