LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default 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



 
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
varying table length in a MACRO tlwhite Excel Discussion (Misc queries) 2 March 16th 10 04:10 PM
Can data be sorted by the length in a field NanAnn58 Excel Worksheet Functions 4 October 6th 09 02:08 AM
Web Query from multiple varying length pages Jeffshex Excel Worksheet Functions 3 August 24th 07 11:21 PM
Sorted Fixed Length String Paul Black[_2_] Excel Programming 8 May 19th 05 04:47 PM
extracting data from a text string of varying length andy from maine Excel Discussion (Misc queries) 4 March 28th 05 07:11 PM


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