Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofit row height
I have a spreadsheet (call MainForm) contain data from col A - H with "wrap text" option on. Column A, B receive data from user input while column C, D & E receive data via a hyperlink to 2 separate spreadsheet as shown in sample below: ='C:\$User\[Issue 01.xls]EntryForm'!$H$5 ='C:\$User\[Issue 01.xls]EntryForm'!$L$5 ='C:\$User\[Issue 01.xls]EntryForm'!$M$5 Cell (H5, L5 & M5) are cell contain text data. I use the following loop to adjust the row height in each cell of the MainForm For i=Start_Row to End_Row Rows(CStr(i) & ":" & CStr(i)).EntireRow.AutoFit Next i I found that NOT all row height are correctly adjusted. For example, if one of the cells in a row contains 5 rows of data within that cell it display only 3 wrapped lines of data within the cell in stead of 5 as I expected. This problem is very consistent in the linked cells. Can someone please tell me how can I correct this problem s.t. when the loop is complete, all rows' height are correctly adjusted with its max lines of wrapped text displayed ? Thanks in advance for any assistance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofit row height
Do you have merged cells?
Autofit doesn't work with merged cells. -- Regards, Tom Ogilvy "Wellie" wrote in message ... I have a spreadsheet (call MainForm) contain data from col A - H with "wrap text" option on. Column A, B receive data from user input while column C, D & E receive data via a hyperlink to 2 separate spreadsheet as shown in sample below: ='C:\$User\[Issue 01.xls]EntryForm'!$H$5 ='C:\$User\[Issue 01.xls]EntryForm'!$L$5 ='C:\$User\[Issue 01.xls]EntryForm'!$M$5 Cell (H5, L5 & M5) are cell contain text data. I use the following loop to adjust the row height in each cell of the MainForm For i=Start_Row to End_Row Rows(CStr(i) & ":" & CStr(i)).EntireRow.AutoFit Next i I found that NOT all row height are correctly adjusted. For example, if one of the cells in a row contains 5 rows of data within that cell it display only 3 wrapped lines of data within the cell in stead of 5 as I expected. This problem is very consistent in the linked cells. Can someone please tell me how can I correct this problem s.t. when the loop is complete, all rows' height are correctly adjusted with its max lines of wrapped text displayed ? Thanks in advance for any assistance. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofit row height
No. None of the cells are merged.
"Tom Ogilvy" wrote: Do you have merged cells? Autofit doesn't work with merged cells. -- Regards, Tom Ogilvy "Wellie" wrote in message ... I have a spreadsheet (call MainForm) contain data from col A - H with "wrap text" option on. Column A, B receive data from user input while column C, D & E receive data via a hyperlink to 2 separate spreadsheet as shown in sample below: ='C:\$User\[Issue 01.xls]EntryForm'!$H$5 ='C:\$User\[Issue 01.xls]EntryForm'!$L$5 ='C:\$User\[Issue 01.xls]EntryForm'!$M$5 Cell (H5, L5 & M5) are cell contain text data. I use the following loop to adjust the row height in each cell of the MainForm For i=Start_Row to End_Row Rows(CStr(i) & ":" & CStr(i)).EntireRow.AutoFit Next i I found that NOT all row height are correctly adjusted. For example, if one of the cells in a row contains 5 rows of data within that cell it display only 3 wrapped lines of data within the cell in stead of 5 as I expected. This problem is very consistent in the linked cells. Can someone please tell me how can I correct this problem s.t. when the loop is complete, all rows' height are correctly adjusted with its max lines of wrapped text displayed ? Thanks in advance for any assistance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Set a minimum row height a the same time with autofit row height | New Users to Excel | |||
Autofit height | Excel Worksheet Functions | |||
Autofit - But At Least a Certain Height | Excel Discussion (Misc queries) | |||
Autofit row height | Excel Discussion (Misc queries) | |||
Need a row to autofit height after it's value changes | Excel Discussion (Misc queries) |