Private Sub ROLparameter_Click()
Line1: RolLow = InputBox("Please enter the lower bound percentage for ROL calculation between 0 and 100 (initially " & RolLow * 100 & "%):")
If Not 0 <= RolLow <= 100 Then GoTo Line1
End If
End Sub
I have user form button, when I press it will enter this sub. The problem is it gives error "end if without if". When I remove end if, it works strangely.
Such as;
it does recognize the RolLow value when user enter 80, as "80". If not directs it to end sub, if i use only "if" then it will direct to line 1 all the time. No checking of the value.
This code working normally in a module.
What can be the problem?
(Variables are defined public before the subs)
(i tried module.variable thing also)