Visual Basic .application values will not update
Visual Basic .application values will not update
(OP)
Hello all,
I am a novice programmer, and have recently began creating simple calculator applications using Visual Basic (I am a power engineer... these are small applications for basic but tedious calculations).
I have often found that after I enter all my data and return a result, if I change a few input values and recalculate, the results will not update.
I am only using text boxes and radio buttons to input information, and a single button to calculate the results.
I have noticed that if I change a radiobutton to a selection that I do not want, hit my calculate button, then return my radio button to my desired selection and hit calculate once more, it will work. Even this does not always work, however. It seems I must change the radiobutton setting several times.
Finally, this situation has occurred on all of my created applications that do implement a radio button.
Is there something that I am missing, or has anyone run into this before?
I am a novice programmer, and have recently began creating simple calculator applications using Visual Basic (I am a power engineer... these are small applications for basic but tedious calculations).
I have often found that after I enter all my data and return a result, if I change a few input values and recalculate, the results will not update.
I am only using text boxes and radio buttons to input information, and a single button to calculate the results.
I have noticed that if I change a radiobutton to a selection that I do not want, hit my calculate button, then return my radio button to my desired selection and hit calculate once more, it will work. Even this does not always work, however. It seems I must change the radiobutton setting several times.
Finally, this situation has occurred on all of my created applications that do implement a radio button.
Is there something that I am missing, or has anyone run into this before?





RE: Visual Basic .application values will not update
RE: Visual Basic .application values will not update
RE: Visual Basic .application values will not update
Offhand, I would say it sounds like the recalculate routine is not updating values for some radio buttons before it runs. Perhaps add some code to the 'on change' event for the radio buttons to update values?
Which version of Visual Basic are you using?
RE: Visual Basic .application values will not update
sub calculate()
a = value(txtBoxA.text)
b= value(txtBoxB.text)
c = value(txtBoxC.text)
d = a * b * c 'or whatever
txtBoxD.text = format(d,"###.##")
end sub
**********************
"The problem isn't finding the solution, its trying to get to the real question." BigInch
http://virtualpipeline.spaces.live.com/
RE: Visual Basic .application values will not update
When you exit a text box - I think you can see that event and go to your calc sub-routines each time.
RE: Visual Basic .application values will not update
**********************
"The problem isn't finding the solution, its trying to get to the real question." BigInch
http://virtualpipeline.spaces.live.com/
RE: Visual Basic .application values will not update
http://visualbasic-source-code.com/visual-basic-6/
Blog for visual basic
http://visualbasicnetcode.blogspot.com/