Oops.., I missed renaming a variable...
Sub GetPermutation(sBlank$, sTextIn$)
Dim lTxtLen&, i&
lTxtLen = Len(sTextIn)
If lTxtLen < 2 Then
Cells(lCurRow, 1) = sBlank & sTextIn: lCurRow = lCurRow + 1
Else
For i = 1 To lTxtLen
GetPermutation sBlank + Mid(sTextIn, i, 1), _
Left(sTextIn, i - 1) + Right(sTextIn, lTxtLen - i)
Next
End If
End Sub
--
Garry
Free usenet access at
http://www.eternal-september.org
Classic
VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.
vb.general.discussion