LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Run time error specifying range for sort code vba excel 2010

Run time error 438 Pbject doesn't support this property or method

Here is my code:

With ActiveWorkbook.Worksheets("Results").Sort
.SetRange .Range(.Cells(1, 1), .Cells(Variable, 1))
.Header = xlYes
.MatchCase = False
.Orientation = xlLeftToRight
.SortMethod = xlPinYin
.Apply
End With

The problem is with the second line, despite comiling with no rpobelm when I run it it comes up with the above error. it is the last bit of my code so if anyone has any ideas hpw I might reference ther desired range (range A1 to A6 but I cannot use that notation as there is a variable) I would appreciate any suggestions.

Regards, Mark
 
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
Duplicate name range error when copying sheet (Excel 2010) JGeniti Excel Programming 4 November 18th 11 05:43 PM
Copied sheet causing duplicate range name error (Excel 2010) jgeniti Excel Discussion (Misc queries) 0 November 17th 11 04:55 PM
Excel 2010 error glenlee Excel Discussion (Misc queries) 0 April 9th 11 03:21 PM
Form 4 Range of time from 1/20/2010 4:00 AM To 1/21/2010 10:00 AM Peter Gonzalez[_2_] Excel Worksheet Functions 2 January 26th 10 06:58 PM
Excel 2003 - VB Code - Run time error....pls help :( KnightSurfer Excel Programming 4 April 21st 05 12:39 AM


All times are GMT +1. The time now is 04:43 AM.

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"