In a class I'm writing, if a bad value is sent to a property, I'd like to raise an error, so that when the class is being used, a Try...Catch...Finally block can work with it.

Would I use an Err.Raise statement in here:

VB Code:
  1. Property LastName() As String
  2.             Get
  3.                 LastName = m_sLastName
  4.             End Get
  5.             Set(ByVal Value As String)
  6.                 If Value = "MENDHAK" Then
  7. [b]'Err.Raise ???[/b]
  8.  
  9.                 Else
  10.                 m_sLastName = Value
  11.                 End If
  12.  
  13.             End Set
  14.         End Property