Solution
Create a class called CContact with getters and setters for these properties.
Private mlContactID As Long
Private msLastName As String
Private msFirstName As String
Private msJobTitle As String
Private msCompany As String
Private msDepartment As String
Private msEmail As String
Private msBusinessPhone As String
Private msCellPhone As String
Private msPager As String
Private msFax As String
Create a CContacts class to hold all the CContact instances. In CContacts, create a FillFromRange method to load up all of the contacts.
Public Sub FillFromRange(rRng As Range)
Dim vaValues As Variant
Dim i As Long
Dim clsContact As CContact
vaValues = rRng.Value
For i = LBound(vaValues, 1) To UBound(vaValues, 1)
Set clsContact = New CContact
With clsContact
.ContactID = vaValues(i, 1)
.LastName = vaValues(i, 2)
.FirstName = vaValues(i, 3)
.JobTitle = vaValues(i, 4)
.Company = vaValues(i, 5)
.Department = vaValues(i, 6)
.Email = vaValues(i, 7)
.BusinessPhone = vaValues(i, 8)
.CellPhone = vaValues(i, 9)
.Pager = vaValues(i, 10)
.Fax = vaValues(i, 11)
End With
Me.Add clsContact
Next i
End Sub
Create procedures to fill the classes, like this
Public Sub Auto_Open()
Initialize
End Sub
Public Sub Initialize()
Set gclsContacts = New CContacts
gclsContacts.FillFromRange Sheet1.Range("C6").CurrentRegion
End Sub
I hope this helps you.