Google
 

View Full Version : Visual Basic Code


Rory
09-17-06, - 05:39 AM
Private Sub Command1_Click()

Dim TERRORIST(2) As String
Dim TERRORIST_GOT_CUT_HIP As Integer

Const THEY_ARE_NUTS As String = "THEY ARE NUTS!"

'// TERRORIST(0) = "IRA" <- discontinued **
TERRORIST(0) = "Hezbollah"
TERRORIST(1) = "Hamas"
TERRORIST(2) = "Al Qaeda"
'// TERRORIST(3) = "n/a" <- live update

Debug.Print "============"
For TERRORIST_GOT_CUT_HIP = 0 To UBound(TERRORIST)
Debug.Print "One More Nutcase Gone!! -> " & TERRORIST(TERRORIST_GOT_CUT_HIP)
Next TERRORIST_GOT_CUT_HIP
Debug.Print "============"
Debug.Print THEY_ARE_NUTS

End Sub


if you have VB6 give it a whirl... :cheers:

Another version ...


Private Sub Command1_Click()

Dim TERRORIST(2)
Dim TERRORIST_GOT_CUT_HIP
Dim TERRORIST_TMP

Const THEY_ARE_NUTS = "THEY ARE NUTS!"

'// TERRORIST(0) = "IRA" <- discontinued **
TERRORIST(0) = "Hezbollah"
TERRORIST(1) = "Hamas"
TERRORIST(2) = "Al Qaeda"
'// TERRORIST(3) = "n/a" <- live update

TERRORIST_TMP = vbNullString
TERRORIST_TMP = TERRORIST_TMP & "============" & vbCrLf
For TERRORIST_GOT_CUT_HIP = 0 To UBound(TERRORIST)
TERRORIST_TMP = TERRORIST_TMP & "One More Nutcase Gone!! -> " & TERRORIST(TERRORIST_GOT_CUT_HIP) & vbCrLf
Next TERRORIST_GOT_CUT_HIP
TERRORIST_TMP = TERRORIST_TMP & "============" & vbCrLf
MsgBox THEY_ARE_NUTS & vbCrLf & TERRORIST_TMP, vbCritical, "SYSTEM ERROR!"

End Sub


And if no VB6 ..
then open new notepad txt file, copy paste this code into it and save as a .vbs file ..
then click it to run..

'// VBSCRIPT

Option Explicit

Call DeyCrazyNutCases

Sub DeyCrazyNutCases()

Dim TERRORIST(2)
Dim TERRORIST_GOT_CUT_HIP
Dim TERRORIST_TMP

Const THEY_ARE_NUTS = "THEY ARE NUTS!"

'// TERRORIST(0) = "IRA" <- discontinued **
TERRORIST(0) = "Hezbollah"
TERRORIST(1) = "Hamas"
TERRORIST(2) = "Al Qaeda"
'// TERRORIST(3) = "n/a" <- live update

TERRORIST_TMP = vbNullString
TERRORIST_TMP = TERRORIST_TMP & "============" & vbCrLf
For TERRORIST_GOT_CUT_HIP = 0 To UBound(TERRORIST)
TERRORIST_TMP = TERRORIST_TMP & "One More Nutcase Gone!! -> " & TERRORIST(TERRORIST_GOT_CUT_HIP) & vbCrLf
Next
TERRORIST_TMP = TERRORIST_TMP & "============" & vbCrLf
MsgBox THEY_ARE_NUTS & vbCrLf & TERRORIST_TMP, vbCritical, "SYSTEM ERROR!"

End Sub