2
我想在Outlook VBA中實現IComparable.CompareTo以使我能夠排序自定義類的ArrayList。我收到以下錯誤:VBA無法實現IComparable.CompareTo
Compile Error: Procedure declaration does not match description of event or procedure having the same name.
這是我班的縮短版(clsEmail):
Option Explicit
Implements IComparable
Dim Sender As String
Dim Recipient As String
Function IComparable_CompareTo(ByVal obj As Object) As Integer
'To do add logic to compare Recipients
CompareTo = 0
End Function
我曾嘗試過各種形式的函數聲明,如IComparable_CompareTo(OBJ爲對象)如龍等無濟於事。
任何指針,我做錯了什麼。