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: 33
Default automatic column sorting problem when protecting sheet

I used the following formula to autosort data in a column with good results:

Private Sub Worksheet_Change(ByVal Target As Range)
Range("A:A").Sort Key1:=Range("A1"), Order1:=xlAscending, _
Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub

The problem is that when I protect the sheet, I get the following error:

runtime error '1004':
Sort message of Range class failed

whereupon it gives me the option to debug. The cells in this particular
column are not protected.

How do I fix this? Thanks in advance for your help.

 
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
protecting a sheet yet allowing for sorting, filtering, formatting [email protected] Excel Discussion (Misc queries) 0 June 28th 06 03:39 PM
Protecting Sheet and still allowing for sorting, filtering and formatting [email protected] Excel Discussion (Misc queries) 0 June 26th 06 05:19 PM
Problem created by sorting linked sheet Becks Excel Discussion (Misc queries) 2 May 2nd 06 12:28 PM
How do I lock the Column without Protecting the Sheet sgmoorthy Excel Discussion (Misc queries) 2 November 4th 05 02:00 PM
Realtime Automatic sorting of data in rows in new work sheet Gazzali Excel Worksheet Functions 0 June 23rd 05 09:35 AM


All times are GMT +1. The time now is 10:59 PM.

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"