I am trying to create a global array that can be referenced across multiple modules. I’ve been searching and searching and can’t seem to find exactly what I’m looking for. Essentially, I want to store this array in it’s own module called modArrays. Then I want to be able to initialize that array in a Combobox during the UserForm initialize event. I’m sure this is an extremely simple task, I just can’t find out how to make it work.
modArray Module
Option Explicit
Public gTransTypeArray As Variant
Sub gTransTypeArrayPopulate()
gTransTypeArray = Array( _
"Acquisition", _
"Disposition", _
"Lease", _
"Easement", _
"Condemnation", _
"Purchase Option", _
"Right of First Refusal/Offer" _
)
End Sub
UserForm
Private Sub UserForm_Initialize()
cmboTransType.List = modArrays.gTransTypeArrayPopulate
End Sub