Expression of the Select Case statement has a type, which cannot be processed with this statement. An expression given in the Select Case statement should have one of the following types:
Boolean
Char
Currency
DateTime
Decimal
Double
Integer
TimeSpan
String
Check the type of expression specified in the Select Case statement. Probably, the expressions need to be cast to one of the above-mentioned types.
Class TestClass: Object
v: Variant;
Sub Run;
Begin
Select Case v
Case ...
End Select;
End Sub Run;
End Class TestClass;
When the specified code is compiled, the following error is displayed: Expression of simple type is expected. Variables of the Variant type cannot be used in the Select Case statement. To resolve the error, change the type of the "v" variable or explicitly convert it to a simple type.
See also: