Tutorial by Examples

The interface Flyable is a class module with the following code: Public Sub Fly() ' No code. End Sub Public Function GetAltitude() As Long ' No code. End Function A class module, Airplane, uses the Implements keyword to tell the compiler to raise an error unless it has two methods...
Using the Flyable example as a starting point, we can add a second interface, Swimmable, with the following code: Sub Swim() ' No code End Sub The Duck object can Implement both flying and swimming: Implements Flyable Implements Swimmable Public Sub Flyable_Fly() Debug.Print &quo...

Page 1 of 1