Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Re-Calculating and Saving

Status
Not open for further replies.

kerenjamieson

Programmer
Aug 24, 2001
8
GB
I have a form for inputting numbers and a Calculate button on the bottom of the form. (For information clicking the calculate button works out how much rope is needed to design Lifts).

Problem 1:

If I input the necessary numbers and click calculate it does the calculation BUT if I change any number and re-click calculate it does nothing, what's happening and how do I sort out?

Problem 2:

I have a list box of error margins - 0, 5 and 10% - on the same form.

Clicking calculate includes the error margin in the final calculation. If I save the file and then re-open it the error margin is back at o% and it doesn't show the usual error margin of 5% which is what I've been saving at. Why is it saving all the numbers in the other text boxes but not for this list box (is it because it is a list box?). How do I work this one out.

Hope someone can help as I'm pretty new to VB and I want to learn and carve out a new career.

Thanks very much

Keren
 
Hi,

You have to show some of your code for us to be able to answer your questions...
Problem 1: Make sure that your calculation are based on the values in the textboxes (f.eks. CSng(Text1.Text) and not on some other variable.
Problem 2: Set the .selected property of the item that sould be selected ( List1.selected(2) to select the 3rd item in the list). by the way - why not use a combobox instead?
Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top