-
Well, I have sorted this out. Here is the code change needed in Sort_String() and beneath it I reverted Function BubbleSort() back to Sub BubbleSort(). Things work as expected.
[vba]' myArry = BubbleSort(myArry) '// 'Can't Assign to Array' according to XL 2004 on Mac (works on PC w/ XL2002)
BubbleSort myArry [/vba][vba]Sub BubbleSort(myArry As Variant)
'// courtesy of DRJ via MDMcKillop
Dim First As Integer
Dim Last As Integer
Dim i As Integer
Dim j As Integer
Dim Temp As String
Dim List As String
First = LBound(myArry)
Last = UBound(myArry)
For i = First To Last - 1
For j = i + 1 To Last
If myArry(i) > myArry(j) Then
Temp = myArry(j)
myArry(j) = myArry(i)
myArry(i) = Temp
End If
Next j
Next i
End Sub[/vba]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules