Does anyone have any code that will allow me to grab 5 random words from TXT file? (and send to text1 for example)

I would like to be able to change it to 20 words from a file or just one.

Here is a code that I have that currently grabs ONE random line from a txt file:

Code Code:
  1. Public Function GetQuote(QuoteFile As String) As String
  2.  
  3. Dim strData() As String, strWholeFile As String
  4. Dim intFileNum As Integer
  5.  
  6. intFileNum = FreeFile
  7.  
  8. 'Allocate buffer and read in complete file
  9. strWholeFile = Space(FileLen(QuoteFile))
  10. Open QuoteFile For Binary As #intFileNum
  11. Get #intFileNum, , strWholeFile
  12. Close intFileNum
  13.  
  14. 'Remove carriage returns
  15. strWholeFile = Replace(strWholeFile, vbCr, "")
  16.  
  17. 'Convert into Array
  18. strData = Split(strWholeFile, vbLf)
  19.  
  20. 'Randomly select element from array
  21. Randomize (Timer)
  22.  
  23. GetQuote = strData(Rnd(1) * UBound(strData))
  24.  
  25. End Function