部分方法必須宣告為 'Private'
更新:2007 年 11 月
在部分方法宣告中需要存取修飾詞 Private。下列範例會顯示 Private 在方法簽章和其實作中的用法。
' Definition of the partial method signature.
Partial Private Sub OnNameChanged()
' The body of the signature is empty.
End Sub
' Implementation of the partial method.
Private Sub OnNameChanged()
MsgBox("Name was changed to " & Me.Name)
End Sub
錯誤 ID︰BC31432
若要更正這個錯誤
- 將關鍵字 Private 加入至簽章和實作宣告的 Sub 之前。