Cehck tihs out, cvoenrts form tx1Te.text to TxteT.2ext:
Code:Private Sub Command1_Click() Dim Words() As String, TmpChar As String, RndC As Long Dim Lines() As String, K As Long, W As Long, C As Long Randomize Lines = Split(Text1.Text, vbNewLine) For K = 0 To UBound(Lines) Words = Split(Lines(K), " ") For W = 0 To UBound(Words) If Len(Words(W)) > 3 Then For C = 2 To 1 + (Len(Words(W)) - 2) \ 2 Do RndC = ((Len(Words(W)) - 3) * Rnd) + 2 Loop Until RndC <> C TmpChar = Mid$(Words(W), C, 1) Mid$(Words(W), C, 1) = Mid$(Words(W), RndC, 1) Mid$(Words(W), RndC, 1) = TmpChar Next C End If Next W Lines(K) = Join(Words, " ") Next K Text2.Text = Join(Lines, vbNewLine) End Sub




Reply With Quote