G
Guest
This code is intended to evaluate a variable called OType. If this variable
is NOT null, then the statements in the Select Case section should run:
Public Function OGroup(OType As Variant, OClass As String)
OrclClass = Left(OClass, 6)
If Not IsNull(OType) Then
Select Case OrclClass
Case 100000 To 199999
OGroup = "ASSETS"
Case 200000 To 270000
OGroup = "LIABILITIES"
Case 280000 To 299999
OGroup = "EQUITY"
Case 347000 To 399000
OGroup = "SALES"
Case 447000 To 480000
OGroup = "COS"
Case 600000 To 948000
OGroup = "EXPENSES"
Case Else
OGroup = "UNCLASSIFIED"
End Select
Else
Debug.Print "It Doesn't Work"
End If
End Function
I'm getting the error message displayed above when I run this function. Any
ideas?
is NOT null, then the statements in the Select Case section should run:
Public Function OGroup(OType As Variant, OClass As String)
OrclClass = Left(OClass, 6)
If Not IsNull(OType) Then
Select Case OrclClass
Case 100000 To 199999
OGroup = "ASSETS"
Case 200000 To 270000
OGroup = "LIABILITIES"
Case 280000 To 299999
OGroup = "EQUITY"
Case 347000 To 399000
OGroup = "SALES"
Case 447000 To 480000
OGroup = "COS"
Case 600000 To 948000
OGroup = "EXPENSES"
Case Else
OGroup = "UNCLASSIFIED"
End Select
Else
Debug.Print "It Doesn't Work"
End If
End Function
I'm getting the error message displayed above when I run this function. Any
ideas?