Stanley Braverman;260814 Wrote:
Getting Invalid or unqualified reference error at .Cells
Sub wordwrap()
Sheets("Sheet1").rows("1:" & .Cells(.rows.Count,
"A").End(xlUp).Row).AutoFit
End Sub
Hello Stanely,
You can write this a couple of ways:
---------------------------------------------------------------
Sheets("Sheet1").rows("1:" & Sheets("Sheet1").Cells(Rows.Count,
"A").End(xlUp).Row).AutoFit
With Sheets("Sheet1")
.rows("1:" & .Cells(Rows.Count, "A").End(xlUp).Row).AutoFit
End With
---------------------------------------------------------------
--
Leith Ross
Sincerely,
Leith Ross
'The Code Cage' (
http://www.thecodecage.com/)
------------------------------------------------------------------------
Leith Ross's Profile:
http://www.thecodecage.com/forumz/member.php?userid=75
View this thread:
http://www.thecodecage.com/forumz/sh...ad.php?t=72780