Re: need help with a program
Are you getting any particular error?
Re: need help with a program
You did declare the Single Variables in the Sub Command1_Click although you need them in the whole programm, put the declaration in the General Section (just below "Option Explicit") . also you are missing the declaration of sngGas and sngRover isn't declared correctly!
Re: need help with a program
i fixed the problems you mentioned but the total still displays 0.
Re: need help with a program
Number one problem is that you are declaring your variables at the event level. sngRover, sngWrangler etc are only available to the Command1_Click event.
They mean nothing whatsoever to any of the option button click events.
Remove those variable declarations from the button's click event and place them as Private in the Form's declaration section. This will make these variables available to EVERYTHING on the form.
Re: need help with a program
And the first line of EVERY code window in VB should be Option Explicit. Then you won't have those problerms.
Re: need help with a program
thanks guys its workin now
Re: need help with a program
One last thing....sngRover is not a Single, it is a Variant. You should change your declares to include sngRover As Single.
Also, if you consider this resolved, would you please pull down the Thread Tools menu and click the Mark Thread Resolved menu item? That will let everyone know that you have your answer.
Thank you. :)