'Enum
Enum Location
Belmont = 0
Kilkenny = 1
End Enum
'Called from Procedure
LocalArray = ArrayDeclaration(Cont1.Caption)
'Called from UserForm
arrBelmont = ArrayDeclaration(Belmont)
arrKilkenny = ArrayDeclaration(Kilkenny)
'Function
Function ArrayDeclaration(Branch As Location)
Select Case Branch
Case Belmont
ArrayDeclaration = Array("100 - Customer Support", _
"101 - Customer Support 101", _
"102 - Resellers", _
"103 - Company Group Accts", _
"104 - Staff Acct", _
"121 - Rep 121", _
"122 - Rep 122", _
"123 - Rep 123", _
"124 - Rep 124", _
"125 - ASA National Accts", _
"126 - Print", _
"127 - New Business", _
"128 - Rep 128", _
"132 - Rep 132", _
"141 - Furniture", _
"151 - Rep 151")
Case Kilkenny
ArrayDeclaration = Array("201 - Customer Support SA", _
"221 - David Surname", _
"222 - Tracey Surname", _
"224 - Myrtle Surname", _
"225 - ASA Accounts SA", _
"226 - Brenton Surname")
End Select
End Function
|