'Class module
'I want to put the numbers and name in, strip them back, compare them and get out the matched name
Sub Class_Globals
'internal _private variables
Private From As String
Private contactnumber As String
Private name As String
End Sub
'data goes in through afrom and acontact to from and contactnumber
Sub Initialize(afrom As String, acontact As String, aname As String)
From = afrom
contactnumber = acontact
name = aname
End Sub
'matchedname comes out if true
Public Sub process(matchedname As String)
From = From.SubString2(From.Length-7, From.Length)
contactnumber = contactnumber.SubString2(contactnumber.Length-7, contactnumber.Length)
If From = contactnumber Then
Return matchedname = name
Log("matched number")
End If
End Sub