![]() |
Row Height
could there be a formatting or rounding issue? Is there a pattern for
certain row heights that are being reported as 0? "Steve" wrote in message ... : Help. : : Running this macro the results are unexpected. : : For rowscount = 1 To 200 : If Worksheets(usingsheet).Cells(rowscount, "G") = True Then : Worksheets(usingsheet).Cells(rowscount, "I") = : Rows(rowscount).RowHeight : End If : Next rowscount : : The purpose of this code is to enter in cell on Column I the height of the : row, but only if the cell in column g is TRUE. : : 75%ish of the entries that should have a value are coming out as zero. The : fact that a zero is entered in the cell means that it is evaluating : correctly, but not reading the correct row height. : : This is causing me a headache, so any assistance would be appreciated. : |
Row Height
Solved it by changing the macro command to:
Worksheets(usingsheet).Range("I" & rowscount).Value = Worksheets(usingsheet).Rows(rowscount).RowHeight I don't know why, but it now works correctly Strange!! "PaulD" wrote: could there be a formatting or rounding issue? Is there a pattern for certain row heights that are being reported as 0? "Steve" wrote in message ... : Help. : : Running this macro the results are unexpected. : : For rowscount = 1 To 200 : If Worksheets(usingsheet).Cells(rowscount, "G") = True Then : Worksheets(usingsheet).Cells(rowscount, "I") = : Rows(rowscount).RowHeight : End If : Next rowscount : : The purpose of this code is to enter in cell on Column I the height of the : row, but only if the cell in column g is TRUE. : : 75%ish of the entries that should have a value are coming out as zero. The : fact that a zero is entered in the cell means that it is evaluating : correctly, but not reading the correct row height. : : This is causing me a headache, so any assistance would be appreciated. : |
All times are GMT +1. The time now is 08:48 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com