ortizSr 0 Unverified User

Gentlemen:

I need help in solving the following problem:

A form that display 10 textboxes calls for 6 variables to be given by the User.
Below are all the variables in the program, but only the ones called for on the form are highlighted.


1.Dim Price As Currency - Starting Variable any # from 1 to 555Million
2.Dim DwnPmt As Double - Any number from 1 to 99 Appl will display it as a %
Dim principal As Currency - Automatically calculated by the appl
3.Dim fRate As Double - Any # from 1 to 99 - Appl displays a %
4.Dim Term As Long - Any # from 1 to 30
Dim payment As Currency Appl cacluates
5.Dim Points As Double -Any # from 1 to 99 Appl Displays as %
6.Dim Costs As Currency -Any Number - Appl displays
Dim PmtwCosts As Currency - Used by Rate Function in Appl
Dim APR As Single - Computed by Excel Rate Function displayed as %
Dim Loanwcosts As Currency - Used by appl formulas
Dim FutureValue As Currency - Set as 0 (zero) for this exercise
Dim FVal As Currency - Set as zero (0)
Dim PayType As Integer 0 = End of Month; 1 = Begin of month Set at 0
Dim Guess As Double - Input message calls for a decimal

All the items displayed in the Form have coding for the displaying of the proper formatting except for Price and Costs.

The application works well in the initial run that calls for all 6 variables to be inputed by the User.

6 (six) separate Clear Cmd buttons are shown on the form for the User to decide which variable needs to be changed to view updated results. User click on the clear item and reenters a new value.

If Formatting of Price as TxtPrice = FormatCurrency(Price) is coded then upon a change being introduced; the appl halts with an Invalid procedure call due to the Price being stored with the symbol $. So this formatting has been remmed.

2nd issue - If formatting for the Other Costs variable is coded as TxtCosts = FormatCurrency(Costs) then upon changing any variable the appl zeros-out this display on the form and shows $000.00.

How can I create an array or a collection (If this is the solution) to store all the variables in their native values to be reused for calculating initial calculations or changes.
Then the Array can be used to feed the form with the proper formatting of the values.

Please I am a beginner in VB6 - Actually this is my first application.

Attached is a zipped file for your review of the application.

Respectfully,
Herman Ortiz

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.