Partial methods must be declared 'Private'

The access modifier Private is required in partial method declarations. The following example shows the use of Private in the method signature and its implementation.

' 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

Error ID: BC31432

To correct this error

  • Add the keyword Private before Sub in the signature and implementation declarations.

See Also

Concepts

Partial Methods