我就这么几分,都给了
怎么会出‘Main()不存在’的错误呢
Modules,startUp已设置成Sub Main
代码:
Option Explicit
Public Name As String
Private mlngDebugId As Long
Public getdatServerStarted As Data
Sub Main()
getdatServerStarted = Now
Debug.Print "Executing Sub Main"
End Sub
Public Function GetDebugId() As Long
Static lngDebugId As Long
lngDebugId = lngDebugId + 1
GetDebugId = lngDebugId
End Function
Public Property Get DebugID() As Variant
DebugID = mlngDebugId
End Property
Public Sub ReverseName()
Dim intCt As Integer
Dim strNew As String
For intCt = 1 To Len(Name)
strNew = Mid$(Name, intCt, 1) & strNew
Next
Name = strNew
End Sub
Private Sub Class_Initialize()
mlngDebugId = GetDebugId
Debug.Print "Initialize Thing" & DebugID & ",Name=" & Name
End Sub
Private Sub Class_Terminate()
On Error Resume Next
Debug.Print "Terminate Thing" & DebugID & ",Name=" & Name
End Sub