Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

hoe kan ik werkbladen (op naam) in excel op alfabet zetten?

459 views
Skip to first unread message

Wilma

unread,
Jan 23, 2007, 8:39:02 AM1/23/07
to
Hallo,
Ik zou graag willen weten hoe ik werkbladen met een naam in excel op alfabet
kan zetten, indien mogelijk.

Kweenie

unread,
Jan 23, 2007, 8:58:05 AM1/23/07
to
Gewoon het tabje van het werkblad vastpakken met de linkermuisknop en
slepen naar waar je hem hebben wilt

Mvg

Piet

Wilma schreef:

Peter Sellmeijer

unread,
Jan 24, 2007, 5:56:41 AM1/24/07
to
Lees de tabbladnamen in een array
sorteer de array (functie bij Micorsoft gecopiëerd)
verplaats de bladen (in volgorde) acheter de laatste
copiëer de code naar een moduleblad

Option Base 1
Option Explicit

Sub sorteerTabbladen()
Dim n, i, j As Integer
Dim Sorteerblad As String
Dim Namenlijst()
n = Sheets.Count
ReDim Namenlijst(n)
For i = 1 To n
Namenlijst(i) = Sheets(i).Name
Next i
SelectionSort Namenlijst
For i = 1 To UBound(Namenlijst)
Sheets(Namenlijst(i)).Move after:=Sheets(n)
Next i
End Sub

Function SelectionSort(TempArray As Variant)
Dim MaxVal As Variant
Dim MaxIndex As Integer
Dim i, j As Integer
' Step through the elements in the array starting with the
' last element in the array.
For i = UBound(TempArray) To 1 Step -1
' Set MaxVal to the element in the array and save the
' index of this element as MaxIndex.
MaxVal = TempArray(i)
MaxIndex = i
' Loop through the remaining elements to see if any is
' larger than MaxVal. If it is then set this element
' to be the new MaxVal.
For j = 1 To i
If TempArray(j) > MaxVal Then
MaxVal = TempArray(j)
MaxIndex = j
End If
Next j

' If the index of the largest element is not i, then
' exchange this element with element i.
If MaxIndex < i Then
TempArray(MaxIndex) = TempArray(i)
TempArray(i) = MaxVal
End If
Next i

End Function

Groeten,
Peter

"Wilma" <Wi...@discussions.microsoft.com> wrote in message
news:95AEDE6D-0BD7-4E4F...@microsoft.com...

Fake dot Com

unread,
Jan 24, 2007, 11:04:11 AM1/24/07
to
compliment, deze is heel fraai


"Peter Sellmeijer" <peter.se...@home.nl> schreef in bericht
news:3F54B607-226D-47A7...@microsoft.com...

0 new messages