Good call.
This way is actually a tiny fraction faster though cause it doesn't need to use that temp varrible to swap.
Dim array(1000000)
Dim unused(1000000)
For i=1 To 1000000
unused(i)=i
Next
For i=1 To 1000000
element=Random(i,1000000)
array(i)=unused(element)
unused(element)=unused(i)
Next