troubleshooting Question

Syntax error for ElseIf

Avatar of Frank Freese
Frank FreeseFlag for United States of America asked on
Microsoft Excel
3 Comments1 Solution122 ViewsLast Modified:
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
    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
    End If

End Sub
Shaun Kline
Lead Software Engineer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros