Recalculating forms

In processing forms I would like to go back to a previous form and
recalculate values. This does not work, as values previously calculated
remain fixed in form.  How do I get the prior forms to recalculate?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Unload then load the form again
Basically, you have to make the subroutine your calling PUBLIC, then call whatever routine that calculated the values in the first place... Again.

For example, lets say you have a subroutine on form1 called CalculateForm, and it figures some numbers and puts them in textboxes on Form1...

You would change the:

   Sub CalculateIt()


   Public Sub CalculateIt()

Then in your other form, you can do:


The calculation routine will run.  You may need to do a Form1.Refresh to repaint the screen.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
forrestxAuthor Commented:
For mcrider- thanks much, you put me on the trail of the solution.  My problem was not too well described:  I calculate values in form1, and appraise in this in a series of later forms, with option to go back and redo form1 when things are not OK. What happens is that the form_load routine in form1 refuses to run on the rerun. I tried loading, unloading, refresh in form1 and calling form, refresh on a timer, etc. and etc. and nothing works. A stop command tried in form1 form_load that operates on the first go will not work in the form_load sub in form1 on return to it, but program then halts at the stop even though the stop does not execute. This proves that the problem is in the Form_load sub. The operations in form1 will run on the rerun but only after a command to another sub therein is pressed. But because the form_load material is not there to advise user what to do this is no good.
  I could not find a way to call form1 form_load routine from the calling form. But I put all material in the form1 load sub in a public sub as you suggested, calling this from Form_load in the first go, and then calling it from the calling sub on the rerun as you suggested and IT WORKS!

Thanks again.
Forrest Blanding
Thanks for the points! Glad I could help!

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.