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;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

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 or unqualified reference error Stanley Braverman Excel Programming 1 March 6th 09 08:32 AM
Invalid or unqualified reference error Stanley Braverman Excel Programming 1 March 6th 09 07:54 AM
Invalid or unqualified reference error Stanley Braverman Excel Programming 0 March 5th 09 06:06 PM
Invalid Cell Reference error Ravi Excel Worksheet Functions 3 August 19th 08 09:47 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 08:46 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"