I have a problem in my code. It seems to be flawless. I've spent the last two weeks trying to find a bug or other errorneus behavior. I just can't find it. Can anyone point me where I should look for them?
Option Explicit
Private Function GetRandomNick() As String
Dim A As Long, NickList() As Variant
NickList = Array("mendhak", "Jacob Roman", _
"eyeRmonkey", "wossname", "NoteMe", "Pino", _
"MartinLiss", "dee-u", "RobDog888", "Valleysboy1978", _
"oceanebelle", "Gary Campbell", "|2eM!x", "baja_yu", _
"mar_zim", "-TPM-", "demotivater", "grilkip")
Randomize
GetRandomNick = CStr(NickList(Int(Rnd * (UBound(NickList) + 1))))
End Function
Private Sub Form_Load()
Dim Nick1 As String, Nick2 As String, Nick3 As String
Nick1 = GetRandomNick: Nick2 = GetRandomNick: Nick3 = GetRandomNick
If LenB(Nick1) = LenB(Nick2) Then If InStr(Nick1, Nick2) = 1 Then Nick2 = "she"
MsgBox Nick1 & " thinks " & Nick2 & " is very good in programming. However, " & Nick3 & " greatly disagrees with this." & _
" It is now up to " & Nick1 & " figure what should be done: to kill " & Nick3 & " or just cause a ban.", _
vbInformation, "VBForums Latest Headlines"
Unload Me
End Sub
Can you think of any more features or give me a tip where I should go with it?
If LenB(Nick1) = LenB(Nick2) Then If InStr(Nick1, Nick2) = 1 Then Nick2 = "she"
MsgBox Nick1 & " thinks " & Nick2 & " is very good in programming. However, " & Nick3 & " greatly disagrees with this." & _
" It is now up to " & Nick1 & " [HL="#FFFF80"]to [/HL]figure [HL="#FFFF80"]out [/HL]what should be done: to kill " & Nick3 & " or just cause a ban.", _
MessageBox.Show(a(0).ToString & " thinks " & a(1).ToString & " is very good in programming. However, " & a(2).ToString & " greatly disagrees with this." & _
" It is now up to " & a(3).ToString & " figure what should be done: to kill " & a(4).ToString & " or just cause a ban.", "VBForums Headlines", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
Function looptoarray(ByVal m As String) As Boolean
Option Explicit
Private Function GetRandomNick() As String
Dim A As Long, NickList() As Variant
NickList = Array("mendhak", "Jacob Roman", _
"eyeRmonkey", "wossname", "NoteMe", "Pino", _
"MartinLiss", "dee-u", "RobDog888", "Valleysboy1978", _
"oceanebelle", "Gary Campbell", "|2eM!x", "baja_yu", _
"mar_zim", "-TPM-", "demotivater", "grilkip")
Randomize
GetRandomNick = CStr(NickList(Int(Rnd * (UBound(NickList) + 1))))
End Function
Private Sub Form_Load()
Dim Nick1 As String, Nick2 As String, Nick3 As String
Nick1 = GetRandomNick: Nick2 = GetRandomNick: Nick3 = GetRandomNick
If LenB(Nick1) = LenB(Nick2) Then If InStr(Nick1, Nick2) = 1 Then Nick2 = "she"
MsgBox Nick1 & " thinks " & Nick2 & " is very good in programming. However, " & Nick3 & " greatly disagrees with this." & _
" It is now up to " & Nick1 & " figure what should be done: to kill " & Nick3 & " or just cause a ban.", _
vbInformation, "VBForums Latest Headlines"
Unload Me
End Sub
Can you think of any more features or give me a tip where I should go with it?
Thanks for all the great help!
How did you come up with that list? I'm flattered to see my name listed.
Regards,
™
As a gesture of gratitude please consider rating helpful posts. c",)
"so just keep in mind that fantasy is not the same as realtiy and make sure u remember that wii sports may be fun but u cant count on it as exercise ok cool bye" - HungarianHuman