This is a small snippet of the code I am writing. It seems to throw an "BLOCK IF WITHOUT END IF" error on the last line. I can’t spot an error here, after consulted with this MSDN link
If Longs > 10 & Shorts > 10 Then
If Longs < Shorts Then
Pairs = Longs
Else
Pairs = Shorts
End If
Else
If Longs < 10 & Shorts > 10 Then
Shortfall = True
Pairs = 10
Else: Shortfall = False
Pairs = 10
End If
End Sub
Any help would be highly appreciated
You’ve got 3
Ifbut only 2End If, change theEnd Subat the end toEnd If.If you indent the code properly, it’ll be much easier to see: