LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default Run time error '1004'

I assigned a recorded macro to an object. When clicked it sorts range
A12:A2500. It works fine until I turn on sheet protection. The range is not
protected, nor is the object.

I receive the error above with "Sort method of range class failed".
Debugging shows below with "Selection....normal" highlighted.

Any help is appreciated

Sub SortByType()
'
' SortByType Macro
' Macro recorded 1/29/2008 by mcgind1
'

'
Range("A12").Select
Application.Goto Reference:="R12C1:R5000C7"
Selection.Sort Key1:=Range("B12"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("A12").Select
End Sub
 
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
run time error 1004 Louise Excel Worksheet Functions 0 January 18th 07 08:16 PM
Run time error 1004 cinvic Excel Discussion (Misc queries) 8 February 21st 06 12:36 PM
Run time error 1004 cinvic Excel Discussion (Misc queries) 3 February 19th 06 12:27 AM
Run-time error '1004 shternm Excel Discussion (Misc queries) 7 October 3rd 05 07:38 PM
Run time error 1004, General ODBC error [email protected] New Users to Excel 0 September 19th 05 01:41 AM


All times are GMT +1. The time now is 04:06 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"