Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Invalid or unqualified reference error
Getting Invalid or unqualified reference error at .Cells
Sub wordwrap() Sheets("Sheet1").rows("1:" & .Cells(.rows.Count, "A").End(xlUp).Row).AutoFit End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Invalid or unqualified reference error
Stanley Braverman;258094 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 Stanley, The period indicates the code statement expects that the Parent qualifier has been declared in a With statement. See below... ---------------------------------------------------- Sub wordwrap() With Sheets("Sheet1") .Rows("1:" & .Cells(.Rows.Count, "A").End(xlUp).Row).Autofit End With End Sub ---------------------------------------------------- -- 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=72065 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Error "invalid data source reference" for pivot table | Excel Worksheet Functions | |||
invalid reference error saving 2003 file in 2007 | Excel Discussion (Misc queries) | |||
Invalid Cell Reference error | Excel Worksheet Functions | |||
pesky invalid external reference error: how to track it down? | Excel Programming | |||
Another invalid or unqualified reference | Excel Programming |