View Single Post
 
Old 10-02-2010, 08:22 AM
BjornS BjornS is offline Windows Vista Office 2003
Competent Performer
 
Join Date: Jan 2010
Location: Sweden
Posts: 116
BjornS is on a distinguished road
Default

Hi,
I am more a "formula expert", but I looked around a little, stole some code and modified it

Here we go:
Right click the sheet tab. Select "View code".
Paste the code below. Modify sort column if wanted (A1 at the moment). Leave with Alt+Q.
Done!

Kind regards
Bjorn

Private Sub Worksheet_Change(ByVal Target As Range)
'Sort this sheet by column A
'Written by OzGrid Business Applications
'www.ozgrid.com
'small modification by Bjorn 2010-10-02

On Error Resume Next
Application.EnableEvents = False
Me.UsedRange.Sort _
Key1:=[A1], Order1:=xlAscending, Header:=xlYes, Orientation:=xlSortColumns
Application.EnableEvents = True
On Error GoTo 0

End Sub
Reply With Quote