Error message:
Reference to non-shared member requires an object reference
frmSearch.vb
Public Function CheckDate(ByVal newValue As String) As BooleanDim rtnVal As Boolean = TrueReturn rtnValEnd Function
main.vb
if frmSearch.CheckDate(Me.photodateTextBox.Text) = FalseMsgBox("Date format incorrect")End
Correction : Add the keyword Shared
frmSearch.vb
Public Shared Function CheckDate(ByVal newValue As String) As BooleanDim rtnVal As Boolean = TrueReturn rtnValEnd Function
Reference:
No comments :
Post a Comment