|
Currently, I'm taking my first VB class in college. I'm not looking for homework help, I've already completed the assignment. However I do have a question that hopefully someone can answer.
I had to design and code a simple application where the user would enter a number of pennies say 330 in a text box, click submit, then the results would be displayed in a message box something like this: "330 pennies converts to:" the result would be broken down into the number of dollars, halves, quarters, etc... all the way to pennies.
I created a string message, and built it up over a series of steps to get it the way I wanted, then included it into the MessageBox.Show command to display it. MessageBox.Show(strMessage, "Conversion Results", MessageBoxButtons.OK , MessageBoxIcon.Information)
The program works fine, but my question is this: The message box using 330 pennies would say: "330 pennies converts to:" Is there a code that I can put in the string message that will use whatever numeric value the user places in the textbox? The program was created using VB2005. Thanks.
|