I've not used VB.net but I can tell you a few problems that jump out at me:
Code:
numyears = years + 1
This would be saying "numyears = 0 + 1" regardless, you probably want to use your initial variable.
Also, I'm not sure if VB.net uses short-hand, years++ and/or years += 1 might work.
Code:
Balance = ((deposit + balance) *.05) + balance)
I'm not sure about this, but I think it should be -
5% of the current balance, plus the current balance, plus the new deposit. (Since banks won't give you a year's worth of interest for a new deposit...dang, I wish...), so maybe...
Code:
Balance = .05 * balance + balance + deposit
Also a side note, you have an interest variable - so you probably should use that instead of the .05 literal.
Also for general logic, (again I've not used VB!), the MsgBox should probably be outside of the loop, so it appears after the do while finishes - and using the
years variable instead.
Hope that helps some.