N
Nancy
I am learning to write code but miss basic concepts. On this one I get an
error message "expected End Sub" but it appears to be at the wrong place.
This is the code. Please help.
Private Sub SeminarID_AfterUpdate()
Function FindWorkshopLocation(varSeminarID As String) As String
If varSeminarID = "070226WMel" Then
WorkshopLocation = West_Melbourne
ElseIf varSeminarID = "070227Orl" Then
WorkshopLocation = Orlando
ElseIf varSeminarID = "070228Gai" Then
WorkshopLocation = Gainsville
ElseIf varSeminarID = "070301Sar" Then
WorkshopLocation = Sarasota
ElseIf varSeminarID = "070302Tam" Then
WorkshopLocation = Tampa
End If
End Function
End Sub
error message "expected End Sub" but it appears to be at the wrong place.
This is the code. Please help.
Private Sub SeminarID_AfterUpdate()
Function FindWorkshopLocation(varSeminarID As String) As String
If varSeminarID = "070226WMel" Then
WorkshopLocation = West_Melbourne
ElseIf varSeminarID = "070227Orl" Then
WorkshopLocation = Orlando
ElseIf varSeminarID = "070228Gai" Then
WorkshopLocation = Gainsville
ElseIf varSeminarID = "070301Sar" Then
WorkshopLocation = Sarasota
ElseIf varSeminarID = "070302Tam" Then
WorkshopLocation = Tampa
End If
End Function
End Sub