"And": If X > 40. the Select Case will end and never see X > 30 And X <40. If X > 30, the Select Case will end and never see X >20 And X < 30
Show me an exampleFurthermore, and I don't understand why, if I finish of with a simple "Else" at the end of the long string of "If...ElseIf...ElseIf..." the VBA stops me right there because even though VBA is quite the forgiving program, it has its limits.
Assuming that the bonus is 40
MsgBox ("Bonus" & Bonus) displays Bonus40
MsgBox "Bonus is " & Bonus displays Bonus is 40. Note the trailing space in "Bonus is "
When learning to code, it is important that you stop looking at Strings as actual words and look at them as objects that must be strung together as words or sentences.
For example I see MsgBox ("Bonus" & Bonus) as Object(MsgBox) and Object(String) and Method(&) and Object(Number Variable)
Do you want to share what you have now?




Reply With Quote