CodeItBetter Programming Another VB Programming Blog

How to Scramble Word – Guaranteed different every time.

Posted on January 4, 2009
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
'String Manipulation - How to Scramble Word - Guaranteed different every time.
Public Function ScrambleWord(Word)
    Randomize
    Length = Len(Word)
    ReDim Letter(Length)
    For I = 1 To Length
5       RndSlot = Int(Rnd * Length) + 1
        If RndSlot = Length + 1 Or Letter(RndSlot) <> "" Then
            GoTo 5
        Else
            Letter(RndSlot) = Mid$(Word, I, 1)
        End If
    Next I
    For I = 1 To Length
        Scrambled = Scrambled & Letter(I)
    Next I
    ScrambleWord = Scrambled
End Function

Related posts:

  1. How to add text to Microsoft Word documents from VB
  2. How To Capitalize The First Character Of Each Word In A String/Phrase.
  3. How to find the next word in a sub string
  4. How to wrap words per line by number of characters (Word Wrap feature)
  5. How to use Microsoft Word to print output from VB
  6. How to Scramble the order of elements in an array.
  7. How to Extract each and every word individually from a text file
  8. How to toggle Word wrap feature on Rich Text Box
  9. How to create MS Word Document from your Program
  10. VB6 Tutorial NotePad Word Pad

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.