Thread: autofit
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default autofit

Do you have merged cells in the row?

if not, it worked OK for me. One thing you can try


Sub AAA()
Set CoverWs = ActiveSheet
With CoverWs.Range("a1")
.WrapText = True
.EntireRow.RowHeight = 409
.EntireRow.AutoFit
End With
End Sub

--
Regards,
Tom Ogilvy


"Elena" wrote:

I'm trying to get data to fit an excel row. I tried to use the autofit
method, but it si not working. This is my code:

CoverWs.Range("a1").WrapText = True
CoverWs.Range("a1").EntireRow.AutoFit()

Can someone tell me how to fix it?

Thanks in Advance!
~Elena