Stu:
Just like yourself, we are all independant posters from around the world coming here to see both what we can learn and what we can answer. Personally, I was just told of this site less than a month ago.
Your message said you found an archived message. If you'll provide the message number, either myself or someone else browsing this site can help you.
(You'll find the message number in your browser's address line after you open the message.)
Kevin
Hi Stu
Here is some code for you that will do it!
To use it Push Alt+F11 and go to Insert>Module.
Paste in the Code. Push Alt+Q to return to Excel.
Push Alt+F8, select "RestrictedSort" and click "Options". Assign a shortcut key of your choice.
Click Ok then Ok and Save.
You will notice I have written the code for a sheet called "Sales". Password being "123", no header row and to sort by A7. Change these to suit. If you have any problems at all, just let me know.
Sub RestrictedSort()
'Written by OzGrid Business Applications
'www.ozgrid.com
With Sheet("Sales")
.Unprotect password:="123"
.Range("A7:L56").Sort _
Key1:=.Range("A7"), Order1:=xlAscending, _
Header:=xlNo, Orientation:=xlSortColumns
.Protect password:="123"
End With
End Sub
Dave
OzGrid Business Applications
Kevin,
That message number is 9936 andwas posted 2/9/01 by Dave.
Thanks,
Stu
Dave,
I am having a problem when I go back into my spreadsheet after inserting the macro in VBA. When I push Alt+F8, and select "RestrictedSort" the "Options" button is not available and I am unable to assign a shortcut key.
What have I left out?
I am emailing you my spreadsheet if that makes it any easier.
Thanks,
Stu