Put your cursor on the Do While statement.
Press F9
Run the program.
When it stops, look a the values of the variables. Are they correct?
If not, check to code to see why not, and hit STOP
If so, < press F8, check variables, repeat > until you find the error.
WaltP
Posting Sage w/ dash of thyme
10,507 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944