|
![]() |
Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming | |
Help with simple Visual Basic Coding
|
||
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) | |||||||||||||
|
Overclocker in Training
![]() |
So Im not much of a coder, and I just started a Visual basic class and the teacher gave us this problem to code a basic cost calculator, simple enough, cept for one problem
Instead of just having two or more text boxes and taking those inputs and calculating them we have to have one text box, and have the user continuously input a value then click subtotal, then put in another value then hit subtotal and so on, until they have entered all the values then they hit grand total and get a final price with shipping and tax, this I have no clue how to do..... So what would the code be to keep taking the value being inputted in one text box and keeping a running total? Thanks for any help
__________________
|
|||||||||||||
|
|
|
|
|
#2 (permalink) | |||||||||||||
|
PC Gamer
|
Having taken and done well in a Visual Basic class, based off of the description of the project, I would say that you need a "total" variable, which I'm sure you knew. Each time you press the Subtotal button, you want to add the value in the text box to the total. When you hit grand total, you will want to return the subtotal times 1.00xxx (the x's here being the tax as a percent), and then add the shipping. Print that to a label. There you go.
__________________
|
|||||||||||||
|
|
|
|
|
#3 (permalink) | |||||||||||||
|
Overclocker in Training
![]() |
thanks!
__________________
|
|||||||||||||
|
|
|
|
|
#4 (permalink) | |||||||||||||
|
PC Gamer
|
Come back if you need any more help.
__________________
|
|||||||||||||
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|