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

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: 896
Default Invalid or unqualified reference error

probably becasue of .Cells and .rows.Count
remove dot and leave only Cells

also you need an explicit reference for .rows.Count

UsedRange.rows.Count might be an option



On 5 Mar, 19:08, "Stanley Braverman" wrote:
Getting Invalid or unqualified reference error

Sub wordwrap()

Sheets("Sheet1").rows("1:" & .Cells(.rows.Count, "A").End(xlUp).Row).AutoFit

End Sub


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
invalid reference error saving 2003 file in 2007 Gary C Excel Discussion (Misc queries) 0 December 8th 09 02:58 PM
Invalid or unqualified reference error Stanley Braverman Excel Programming 1 March 6th 09 08:32 AM
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 03:49 PM.

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

About Us

"It's about Microsoft Excel"