Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error "invalid data source reference" for pivot table Manny Excel Worksheet Functions 6 April 5th 23 02:58 PM
invalid reference error saving 2003 file in 2007 Gary C Excel Discussion (Misc queries) 0 December 8th 09 02:58 PM
Invalid Cell Reference error Ravi Excel Worksheet Functions 3 August 19th 08 09:47 PM
pesky invalid external reference error: how to track it down? Matthew Dodds Excel Programming 0 November 17th 06 03:33 PM
Another invalid or unqualified reference davegb Excel Programming 24 August 31st 05 06:32 PM


All times are GMT +1. The time now is 05:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"