Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have developed a small data entry system to make my bosses' secretary life
easier. The proble is when she print out what are the current jobs for the IT dprt, (2 of us), I cannot get excel to autofit cells in specifi rows. The rows for some reason hide the last line of the content of the cells whose content need to be readable. Here I select an entire row and apply Autofit to each cell on that row, but it doesn't work (curRow is avariable that holds the Current Row No) Range("E" & curRow & ":" & "G" & curRow).Select With Selection .VerticalAlignment = xlTop .HorizontalAlignment = xlLeft .WrapText = True .Rows.AutoFit End With Any idea would be greatly appreciated. TIA all Philippe |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This worked for me:
Sub autofit() For curRow = 1 To ActiveSheet.UsedRange.Rows.Count Range("A" & curRow).EntireRow.Select With Selection .VerticalAlignment = xlTop .HorizontalAlignment = xlLeft .WrapText = True .Rows.autofit End With Next End Sub *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sounds good, I'll give it a try, thanks for your reply.
Philippe "Claud Balls" wrote in message ... This worked for me: Sub autofit() For curRow = 1 To ActiveSheet.UsedRange.Rows.Count Range("A" & curRow).EntireRow.Select With Selection .VerticalAlignment = xlTop .HorizontalAlignment = xlLeft .WrapText = True .Rows.autofit End With Next End Sub *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Autofit row doesnt always work | Excel Discussion (Misc queries) | |||
Autofit (Columns.EntireColumn.AutoFit) does not work | Excel Discussion (Misc queries) | |||
Autofit does not work when cell is updated automatically. | Excel Discussion (Misc queries) | |||
Autofit doesn't work | Excel Discussion (Misc queries) | |||
The Row Height Autofit command does not work. | Excel Worksheet Functions |