I am trying to figure a way to determine if the users variable type is boolean or not. Ages ago you could use VarType, but that is long gone, so I was trying to use TypeOf but I am getting the error "Expected object or type name". Can anyone tell me what I am doing wrong?

The abbreviated code is:

Dim varItems As Variant

If TypeOf varItems Is Boolean Then
            lngRange = lngRange - 1
           
End If