View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Set row heights to values in cells

Sub SetHeights()
Dim cell As Range
For Each cell In Range("A1:A20")
cell.EntireRow.RowHeight = cell.Value
Next
End Sub


--
Regards,
Tom Ogilvy


"John" wrote in message
...
Can anyone provide VBA code to set row heights for a range of rows (say,

rows
20-100) to the values in a particular column (say column A)? In other

words,
row height for row 1 equals value in cell A1; row height for row 2 equals
value in cell A2, etc. Also, what limit does Excel impose on maximum row
height? Any help would be appreciated.