View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default worksheets in alphabetical order in office 2007

Hi,

I don't believe the method of entering code in Excel 2007 has changed but
someone will correct me if I'm wrong.

Right click any worksheet tab, view code and paste the code below in. With
the cursor within the code tap F5 in VB editor to run it and your sheets
should sort

Sub Sortem()
For x = 1 To Worksheets.Count
For y = x To Worksheets.Count
If UCase(Sheets(y).Name) < UCase(Sheets(x).Name) Then
Sheets(y).Move Befo=Sheets(x)
End If
Next
Next
End Sub


Mike

"DJH84" wrote:

How do I arrange my worksheets in a single work book into alphabetical order.
I am using Vista & office 2007. If I need to use Macros I also need
instructions on what to do as I have never used them before.