Buzzword Generator
Awhile back I wrote a buzzword generator in VBA. Here's the version I use for either generating a spreadsheet with 500 buzzwords or to generate one as a popup.
Feel free to use the code:
Private Function RandomizedNumber( _
intLow As Integer, intHigh As Integer)
Randomize
RandomizedNumber = Int((intHigh * Rnd) + intLow)
End Function
Public Sub MSGME()
' Returns a message box with one buzzword
MsgBox ReturnBuzzword3
End Sub
Public Sub Create500()
' Creates 500 buzzwords on the CURRENT sheet
Dim x As Integer
For x = 1 To 500
Cells(x, 1).Value = ReturnBuzzword3
Next x
End Sub
Private Function ReturnBuzzword3()
Dim varColumn(210, 1) As Variant
Dim intI As Integer,
DIM int1 As Integer, int2 As Integer, int3 As Integer
Dim blnContinue As Boolean
' Use this space to load array with adj, verbs & Nouns
Do Until blnContinue = True
int1 = RandomizedNumber(0, UBound(varColumn))
int2 = RandomizedNumber(0, UBound(varColumn))
int3 = RandomizedNumber(0, UBound(varColumn))
blnContinue = False
If (int1 <> int2) And (int1 <> int3) And (int2 <> int3) Then
If ((varColumn(int1, 1) = "adverb") Or (varColumn(int1, 1) = "verb")) _
And (varColumn(int2, 1) = "adjective") _
And (varColumn(int3, 1) = "noun") Then
blnContinue = True
End If
End If
Loop
ReturnBuzzword3 = varColumn(int1, 0) & " " & varColumn(int2, 0) & " " & varColumn(int3, 0) & " "
End Function
Labels: Code, Technology, Words
n
