Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi all
I created a button in a protected worksheet to allow sorting of data in column A6 to A60 which does not work. Pls help. I used the following code which I found in the discussion group. What I need is to sort only a range of datas in one column, eg A6 to A60 Sub sortit() Dim coltosort As Range Set coltosort = Application.InputBox(Prompt:= _ "Select A Column", Type:=8) ActiveSheet.Unprotect Password:="justme" ActiveSheet.UsedRange.Sort Key1:=coltosort.Cells(2), _ Order1:=xlAscending, Header:= _ xlGuess, OrderCustom:=1, MatchCase:=False, _ Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal With ActiveSheet ...Protect Password:="justme" ...EnableSelection = xlNoRestrictions End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to enable a macro in protected sheet | Excel Discussion (Misc queries) | |||
Sorting a protected sheet | Excel Worksheet Functions | |||
Macro Error when Sheet is Protected | Excel Discussion (Misc queries) | |||
use macro button to run macro in protected sheet | Excel Discussion (Misc queries) | |||
How can you create a macro on a protected sheet? | Excel Discussion (Misc queries) |