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

Maybe you meant:

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

If you use a bare "." like in your ".Cells" it needs to be in the context of
a "With...End With" block.
I would also suggest qualifying the workbook for the worksheet.


Tim

"Stanley Braverman" wrote in message
...
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 or unqualified reference error Stanley Braverman Excel Programming 1 March 9th 09 04:32 AM
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
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:09 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"