I would give you a D, but I love VBA

Using NAME is really wrong because Name is a reserved Keyword, You can use EmpName, (employee name,) instead. You can test for Keywords by placing the typing Cursor in the word and pressing F1 as if you were bringing up the help file for the Word, if it's not a keyword, there will be no help for it. Fix that for a C

Integers are good for numbers up to 32K, so you cannot use them for counting Row and many other things. Microsoft is talking about deprecating Integers and just using Longs. Integers were needed when RAM was scarce and expensive. Doubles are for Decimal Numbers, but VBA is very forgiving and most time will translate the Right hand Value to the Left hand value without complaint. (Integer = Double = no problem except you lose the unused, (for now?) Decimal fraction.) If the parameters for the bonus change to fractional Hours, you must refactor the entire procedure. Did I mention that I love VBA?

InputBoxes return Strings, but you're comparing numbers. Fortunately, VBA is very forgiving. Check out the Help on CInt, CLng, and CDbl.

MsgBoxes only accept Strings, fortunately the & "function" incorporates a CStr method. BTW, haveyou reallylooked atthe MsgBoxoutput?

That kludgey string of 'If... And ... Then's is keeping you down to a B. If you want an A, use 'If...Then... ElseIf... ElseIf...ElseIf... Else', (or a Select Case,) and no 'And's.


"Give me an AYE!"
"Give me an AYE!"
"Give me an AYE!"

YAY TEAM!