Avatar of Frank Freese
Frank Freese
Flag for United States of America asked on

Syntax error for ElseIf

Folks,
I am having a problem with the syntax in line 8 and need help here please
Sub UserInput()
   Dim Results As Variant
    Results = Range("L9").Value
    If Not (IsNumeric(Results)) Then 'not a number
        MsgBox "Invalid value for Significance – must be numeric!", vbCritical
        Range("L9").ClearContents
        Range("L9").Select
    ElseIf Results = "<=0" or Results "=>1" Then 'The value must be great than 0 and less than 1
        MsgBox "Invalid value for Significance - must not be greater than zero but less than 1!", vbCritical
        Range("L9").ClearContents
        Range("L9").Select
    End If

End Sub

Open in new window

Microsoft Excel

Avatar of undefined
Last Comment
Frank Freese

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Shaun Kline

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Frank Freese

ASKER
Yes it is but I've got myself into an end less loop?
Frank Freese

ASKER
Thank you
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck