Thread: Range Prompt
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tanya Tanya is offline
external usenet poster
 
Posts: 155
Default Range Prompt

Hi I have the following code which is working well, but I'd like to improve
on it.
Ideally I would like a msg prompt to select "AK2"
Perhaps I could name the range AK2 as I have "RANKING"? Not sure about msg
prompt?
If anyone could help, I would appreciate it.
Kind Regards
Tanya

Private Sub CommandButton3_Click()
UnProtect_Workbook
Application.Goto Reference:="RANKING"
ActiveWindow.SmallScroll Down:=-9
'Sort by Sem-2 Rank
Selection.Sort Key1:=Range("AK2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
ActiveWindow.SmallScroll ToRight:=2
Protect_Workbook
End Sub