I'm trying to do a very simple if, then, else program in excel VBA (which I'ved simplified even further below). What I'm hoping will happen is that it will keep asking me for a variable until its greater than 5 and then it will post a single message of 'finished'
What actually happens is that depending on how many time I provide an input before I get to something that's greater than 5 it will then repeat the 'finished' message that number of times. What am I doing wrong.
Sub test()
Dim var1 As Variant
var1 = InputBox("variable please")
If var1 < 5 Then
Call test
Else
MsgBox ("two")
End If
MsgBox ("finished")
End Sub