Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
joeeng
 
Posts: n/a
Default 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   Report Post  
Dave Peterson
 
Posts: n/a
Default

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   Report Post  
joeeng
 
Posts: n/a
Default

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   Report Post  
Dave Peterson
 
Posts: n/a
Default

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   Report Post  
joeeng
 
Posts: n/a
Default

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   Report Post  
Dave Peterson
 
Posts: n/a
Default

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
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
In Cell Validation List & Linked Cell VLOOKUP BEEZ Excel Discussion (Misc queries) 7 July 1st 07 07:17 PM
cell contents Kevin Excel Discussion (Misc queries) 1 March 8th 05 11:23 AM
Adding contents of one cell to a range of cells. CLJinVA Excel Worksheet Functions 1 February 10th 05 10:19 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM
Function to operate on ink linked to cell Alan T Excel Worksheet Functions 0 November 20th 04 10:03 PM


All times are GMT +1. The time now is 08:43 AM.

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"