G
Guest
I'm getting a compile error - Else without If when running this code:
Public Function AcctClass2 (GLAccount As String, AcctDesc As String)
Select Case GLAccount
Case 120010, 123007, 124003
If GLAccount = 124003 And AcctDesc = "CONTACTS RECEIVABLE" Then
AcctClass2 = "Other Receivable"
Else AcctClass2 = "Trade A/R"
End If
Case 124007, 170080 To 170088, 120483 To 120484
AcctClass2 = "Rebate Receivable"
Case Else
AcctClass2 = “Undefinedâ€
End Function
When the GLAccount is 124003 AND the AcctDesc is "Contacts Receivable", the
function should return "Other Receivable"
otherwise return "Trade A/R", but it is within this IF statement that I'm
getting the error. Any ideas?
Public Function AcctClass2 (GLAccount As String, AcctDesc As String)
Select Case GLAccount
Case 120010, 123007, 124003
If GLAccount = 124003 And AcctDesc = "CONTACTS RECEIVABLE" Then
AcctClass2 = "Other Receivable"
Else AcctClass2 = "Trade A/R"
End If
Case 124007, 170080 To 170088, 120483 To 120484
AcctClass2 = "Rebate Receivable"
Case Else
AcctClass2 = “Undefinedâ€
End Function
When the GLAccount is 124003 AND the AcctDesc is "Contacts Receivable", the
function should return "Other Receivable"
otherwise return "Trade A/R", but it is within this IF statement that I'm
getting the error. Any ideas?