Hello,
My problem is that even though I set my sheet to Autofit row height, it doesn't recognize the full text in the cell because the cells only contain references to text on other sheets. I'd like it to autofit every time I make a change or every time I change sheets.
I found the following code elsewhere online, but it's not working for some reason.
Any ideas on what I might be doing wrong?
Thanks,
Sbrien
My problem is that even though I set my sheet to Autofit row height, it doesn't recognize the full text in the cell because the cells only contain references to text on other sheets. I'd like it to autofit every time I make a change or every time I change sheets.
I found the following code elsewhere online, but it's not working for some reason.
Code:
[COLOR=#333333]Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)[/COLOR]
[COLOR=#333333] Dim WS As Worksheet[/COLOR]
[COLOR=#333333] For Each WS In ThisWorkbook.Worksheets[/COLOR]
[COLOR=#333333] WS.Rows.AutoFit[/COLOR]
[COLOR=#333333] Next[/COLOR]
[COLOR=#333333]End Sub[/COLOR]
Any ideas on what I might be doing wrong?
Thanks,
Sbrien