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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Defining VBA codes 1

Status
Not open for further replies.

ccheng

Technical User
Oct 25, 2004
3
US
Can someone help me with the following form? I'm new at this and I'm trying to figure out what links or formulas are used to calculate PrixAnnuelHorsOption3 and PrixAnnuelHorsOption4.

Private Sub Form_Current()
Dim Volume As Double, prixDemar As Double, prixCom As Double, prixDemarVol As Double, prixDemarHab As Double, PrixAnnuel As Double, prixAnnuelCom As Double, prixAnnuelVol As Double, prixAnnuelHab As Double
Dim prixAnnuelHO As Double, prixAnnuelVolHO As Double, prixAnnuelHabHO As Double, prixoption As Double


Call SyntheseGen(Me![Index_Contrat], Me![Ix_Type_Contrat], Me![Marge], 3, Me![Population_Cont], Volume, prixDemar, prixCom, prixDemarVol, prixDemarHab, PrixAnnuel, prixAnnuelCom, prixAnnuelVol, prixAnnuelHab, prixAnnuelHO, prixAnnuelVolHO, prixAnnuelHabHO, prixoption)
Me![PrixAnnuelHorsOption3] = prixAnnuelHO

Call SyntheseGen(Me![Index_Contrat], Me![Ix_Type_Contrat], Me![Marge], 4, Me![Population_Cont], Volume, prixDemar, prixCom, prixDemarVol, prixDemarHab, PrixAnnuel, prixAnnuelCom, prixAnnuelVol, prixAnnuelHab, prixAnnuelHO, prixAnnuelVolHO, prixAnnuelHabHO, prixoption)
Me![PrixAnnuelHorsOption4] = prixAnnuelHO

End Sub

Thank you very much.

 
Somewhere in the VBA project there is a Sub procedure named SyntheseGen which presumably is calculating these values in response to the Calls, and returning the result in prixAnnuelHO. The 4th parameter to SyntheseGen, 3 or 4, determines whether what it calculates is Option3 or Option4.

Try right-clicking on the word "SyntheseGen" and selecting Definition from the pop-up menu. If the code of the SyntheseGen procedure is within the project or a referenced VBA project, and is viewable, doing this will display the procedure to you. Then it's up to you to analyze the logic.

Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top