Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Run time error '1004'

Hi everyone,

I'm new to using excel. I have created a template that includes in it
a macro that sorts customers by their last name. Works fine when I run
it with Sheet unprotected, but when I protect the Sheet an error
message comes out when I ty to run the macro again that reads:

Run time error '1004'
Sort method of Range class failed

Sheet Unprotected

Range("C6:C12").Select
Range("A5:K12").Sort Key1:=Range("C6"), Order1:=xlAscending,
Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal


Sheet Protected ( second line down to last is highlighted)

Range("C6:C12").Select
Range("A5:K12").Sort Key1:=Range("C6"), Order1:=xlAscending,
Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal

I would appreciate very much any help regarding how to fix this
problem.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

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
run time error 1004 brownti via OfficeKB.com Excel Discussion (Misc queries) 5 February 14th 07 04:50 PM
Run Time Error '1004' Carpie Excel Discussion (Misc queries) 3 June 5th 06 07:04 PM
Run-Time error '1004' [email protected] Excel Discussion (Misc queries) 3 March 29th 06 08:13 PM
Run time error 1004, General ODBC error [email protected] New Users to Excel 0 September 19th 05 01:41 AM
Run Time Error '1004' Sam K Excel Programming 0 July 31st 03 04:22 PM


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