Jennifer_28
New member
- Joined
- May 12, 2008
- Messages
- 2
- Programming Experience
- 1-3
I have a function I'd like to create, however, I'm not sure if you ALWAYS have to DIM something. Can anyone shed some light?
VB.NET:
Private Function PerCorp() As Boolean
If CType(m_screenContact.ResData, Res).IS_CORP_YN.Equals("N") Then
MsgBox("Please Select C or P", MsgBoxStyle.Exclamation Or MsgBoxStyle.SystemModal Or MsgBoxStyle.OkOnly, "Missing Information")
Return False
If CType(m_screenContact.ResData, Res).IS_CORP_YN.Equals("C") Then
ElseIf CType(m_screenContact.Mas, Mas).COMPANY Is Nothing OrElse CType(m_screenContact.MasData, Mas).COMPANY.Trim.Length = 0 Then
MsgBox("Please Enter the Corporate Name.", MsgBoxStyle.Exclamation Or MsgBoxStyle.SystemModal Or MsgBoxStyle.OkOnly, "Missing Information")
Return False
Else
Return True
End If
End If
End Function