I missed that. My Bad. Try this
If X > 40 Then
Bonus = 50
ElseIf X > 30 Then
Bonus = 40
ElseIf X > 20 Then
Bonus = 30
ElseIf X > 10 Then
Bonus = 20
Else: Bonus = 10
End If
Or this, Although I don't like the Colon = Next Line format
If X > 40 Then: Bonus = 50
ElseIf X > 30 Then: Bonus = 40
ElseIf X > 20 Then: Bonus = 30
ElseIf X > 10 Then: Bonus = 20
Else: Bonus = 10
End If
but this is better
If X > 40 Then
Bonus = 50
ElseIf X > 30 Then
Bonus = 40
ElseIf X > 20 Then
Bonus = 30
ElseIf X > 10 Then
Bonus = 20
ElseIf X > 0 Then
Bonus = 10
End If