[VBA ] excel 2007 继承问题

楼主: gecer (gecer)   2014-07-19 12:05:11
小弟定义下列两个类别
'Class B
Option Explicit
Public as1 As Integer
Public Sub o()
End Sub
Public Sub p()
Debug.Print "p_B"
End Sub
Private Sub Class_Initialize()
as1 = 5
End Sub
'Class A
Option Explicit
Implements B
Dim as1 As Integer
Public Sub B_o()
Debug.Print "o_A"
End Sub
Public Sub B_p()
End Sub
Public Sub onlyA()
Debug.Print "A"
End Sub
但是却出现"物件模组必须撰写as1 以提供B接口"
请问要如何解决 谢谢

Links booklink

Contact Us: admin [ a t ] ucptt.com