Dim aProjects(8)
' aProjects(0) is skipped for convenience
aProjects(1) = Array( _
"Company 1 ", _
"Sales Guy 1 ", _
"Sales Guy 2 ", _
"123 Kitty Kat Lane ", _
"Suite 100 ", _
"Jacksonville, FL 00000 ", _
"4565 ", _
"5557771234 ", _
"5557771234 " _
)
aProjects(2) = Array( _
"Company 2 ", _
"Sales Guy 1 ", _
"Sales Guy 2 ", _
"123 Kitty Kat Lane ", _
"Suite 100 ", _
"Jacksonville, FL 00000 ", _
"4565 ", _
"5557771234 ", _
"5557771234 " _
)
aProjects(3) = Array( _
"Company 3 ", _
"Sales Guy 1 ", _
"Sales Guy 2 ", _
"123 Kitty Kat Lane ", _
"Suite 100 ", _
"Jacksonville, FL 00000 ", _
"4565 ", _
"5557771234 ", _
"5557771234 " _
)
aProjects(4) = Array( _
"Company 4 ", _
"Sales Guy 1 ", _
"Sales Guy 2 ", _
"123 Kitty Kat Lane ", _
"Suite 100 ", _
"Jacksonville, FL 00000 ", _
"4565 ", _
"5557771234 ", _
"5557771234 " _
)
aProjects(5) = Array( _
"Company 5 ", _
"Sales Guy 1 ", _
"Sales Guy 2 ", _
"123 Kitty Kat Lane ", _
"Suite 100 ", _
"Jacksonville, FL 00000 ", _
"4565 ", _
"5557771234 ", _
"5557771234 " _
)
aProjects(6) = Array( _
"Company 6 ", _
"Sales Guy 1 ", _
"Sales Guy 2 ", _
"123 Kitty Kat Lane ", _
"Suite 100 ", _
"Jacksonville, FL 00000 ", _
"4565 ", _
"5557771234 ", _
"5557771234 " _
)
aProjects(7) = Array( _
"Company 7 ", _
"Sales Guy 1 ", _
"Sales Guy 2 ", _
"123 Kitty Kat Lane ", _
"Suite 100 ", _
"Jacksonville, FL 00000 ", _
"4565 ", _
"5557771234 ", _
"5557771234 " _
)
aProjects(8) = Array( _
"Company 8 ", _
"Sales Guy 1 ", _
"Sales Guy 2 ", _
"123 Kitty Kat Lane ", _
"Suite 100 ", _
"Jacksonville, FL 00000 ", _
"4565 ", _
"5557771234 ", _
"5557771234 " _
)
Do
return = InputBox("Enter data","My Input")
If Vartype(return) = 0 OR return = ""Then
MsgBox "Cancelled"
WScript.Quit
ElseIf CInt(return) < 1 Or CInt(return) > UBound(aProjects) Then
MsgBox "Value must be between 1 And " & UBound(aProjects)
Else
Exit Do
End If
Loop While True
i = CInt(return)
'apply array to variables
name1 = aProjects(i)(0)
name2 = aProjects(i)(1)
name3 = aProjects(i)(2)
addr1 = aProjects(i)(3)
addr2 = aProjects(i)(4)
addr3 = aProjects(i)(5)
extension = aProjects(i)(6)
phone1 = aProjects(i)(7)
phone2 = aProjects(i)(8)
MsgBox "You Chose - " & name1
Colorized by: CarlosAg.CodeColorizer