Answers for "vba implements"

VBA
0

vba implements

' Add class ClsInterface:
Public Function add(x As Integer, y As Integer) As Integer
End Function
'-----------------------------------------------------------------------
' Add class ClsMyClass: add(...) is Private
Implements ClsInterface
Private Function ClsInterface_add(x As Integer, y As Integer) As Integer
    ClsInterface_add = x + y
End Function
'-----------------------------------------------------------------------
Sub TestMe()
    Dim obj As New ClsInterface
    Debug.Print obj.add(1,2)        '3
End Sub
Posted by: Guest on February-12-2021

Code answers related to "VBA"

Browse Popular Code Answers by Language