View Single Post
  #2   Report Post  
Don Guillett
 
Posts: n/a
Default

here are a couple to try
Sub sortworksheets()
Dim Cnt As Integer
Dim n As Integer
Dim m As Integer
Dim WS As Worksheet
Set WS = ActiveSheet
Cnt = ActiveWorkbook.Worksheets.COUNT
For m = 1 To Cnt
For n = m To Cnt
If UCase(Worksheets(n).Name) < UCase(Worksheets(m).Name) Then
Worksheets(n).Move Befo=Worksheets(m)
End If
Next n
Next m
WS.Activate
End Sub
Sub sortworksheetsA()
Dim m As Integer
On Error GoTo EndOfMacro
Application.ScreenUpdating = False
Cnt = ActiveWorkbook.Worksheets.COUNT
For m = 1 To Cnt
For n = m To Cnt
If UCase(Worksheets(n).Name) < UCase(Worksheets(m).Name) Then
Worksheets(n).Move Befo=Worksheets(m)
End If
Next n
Next m
EndOfMacro:
Application.ScreenUpdating = True
End Sub

--
Don Guillett
SalesAid Software

"pineywoods" wrote in message
...
I have a workbook with 4 worksheets. The "name" column is linked from

SHEET1
to the "name" column in SHEET2, SHEET3 and SHEET4. I need to be able to
change a name in SHEET1 and sort all of the data colunms in all 4 sheets

by
"name." Any ideas on how to do this?