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