Varying length records to be sorted
With Worksheets("mySheet")
.Unprotect password:="mypassword"
.Range("A1:M20").Sort Key1:=.Range("C1"), Header:=xlYes
.Protect password:="mypassword", DrawingObjects:=True,
Contents:=True, Scenarios:=True
End With
--
---
HTH
Bob
(change the xxxx to gmail if mailing direct)
"Sarah_Lecturer" wrote in message
...
Hiya
I need some code to
1) Unprotect the workbook with the password
2) Select relevant column eg Surname
3) Sort into alphabetical order
4) Reprotect the spreadsheet with the same original password
Any suggestions - Id be grateful
Thanks
|