I'm learning vb and completing tutorials to help understanding. however, i am stuck.
i need help with the following program. i have completed the other tutorials, but not this one as i don't know where to start from. i need to complete this as soon as possible. i am learning visual basic from tutorials but stuck on this particular one.
An Investment Club meets regularly to review a range of investment opportunities. The club members provide information about the future investment goals, and the how far ahead, in years, to achieve this goal, together with an estimate of the likely return on the investment.
For each investment the designated club member will provide the following information:
a. future investment goal, the Future Value (FV)
b. the term of the investment in years, (Term)
c. and the estimated yearly interest rate, (Rate).
For each investment by a designated club member:
a. compute and display the initial amount (PV) that must be invested to attain the investment goal for each individual investment opportunity.
b. after the calculation for each individual investment, provide a summary containing:
• the number of investments
• the total initial investment amount required for all investments to be displayed.
A club summary, which should be displayed on a second form and contain:
• a summary of the total number of investors in the club,
• the total value of all initial investments,
• the average initial investment per investor.
it's basically a calculator to that can carry out the tasks.
the variables i have got in mind:
dim interest rate as single
dim investment as single
future investment goal
please can you help me solve this. please start me of so that i know how you are doing this.
this is what i am thinking of
This is what i have thought of
Private fInitialInv As Currency ‘Initial investment amount
Private fnumInv As Integer ‘Number of investors
Private fTotalInitInv As Currency ‘Total of all initial investments
Purpose
this program computes the initial investment for individual club members
and for the club as a whole given the future goal, annual interest rate, and term in years,
the initial investment will be found and displayed. additionally, for multiple investment
by a single investor, the number of investments and their total value are computed and displayed.
finally, the number of investors, their total and average initial investment are displayed on a summary form.
Input
FV
Term (calculate by PV)
Rate
Output
Number of investments (+1)
Total investment (TInvestments + PV)
I have thought on the following buttons for the program, but not sure:
Calculate
Add to portfolio
Clear inputs
Add to club
New investor
Club summary
Exit
Investor name , text box to enter details
Investment goal, text box to enter details
Term in years, text box to enter details
GrowthRate%, text box to enter details
You need a form that allows the member to enter the FV target, the term of the investment, and the Rate of Interest. I think then maybe a button that has some code behind it to calculate the required PV needed to reach the FV taking into account the term (timeframe?) of the investment, and the expected rate of Interest per month/year/week.
After the calculation then the PV would be displayed.
hello it seems to be a spreadsheet question, although I can see the advantage of coding the project in vb. Is it a uni question or required in order to make a real decision?
hello it seems to be a spreadsheet question, although I can see the advantage of coding the project in vb. Is it a uni question or required in order to make a real decision?
I'm learning vb and completing tutorials to help understanding.
Would appear to be a tutorial project from a learning course.
a. compute and display the initial amount (PV) that must be invested to attain the investment goal for each individual investment opportunity.
b. after the calculation for each individual investment, provide a summary containing:
• the number of investments
• the total initial investment amount required for all investments to be displayed.
Do you know how to do the calculation for this on paper?
This is the problem, i can't write the code. i'm finding it difficult. i've set up the buttons:
calculate
clear inputs
add to club
add to portfolio
new investor
club summary
exit
i can do the code for the clear inputs and exit, but not for the rest
i will be grateful if you can start me of.
zob this is fairly straight forward stuff, surely the book you are doing the tutorial from has discussed vb coding conventions, how to use textbox values etc?
Soirry have no idea on the formula though a quick google will probably give it to you.
this is the code. its not adding to the club, it is in one way but the amount is zero. i can't also set my amount to currncy. please have a look, if this sounds confusing have a look at the attachment of my program, you will understand it.
Option Explicit
Public PV As Double
Public FV As Double
Public i As Double
Public n As Double
Public Initial As Double
Public Investments As Double
Public Investors As Integer
Private Sub cmdExit_Click()
Dim ans As Integer
ans = MsgBox("Are you sure you want to quit?", vbYesNo + vbQuestion, "quit") 'This is the message to be displayed once clicked on exit
If ans = vbYes Then
End
End If
End Sub
Private Sub cmdSummary_Click()
' Purpose: When the Display Second Form button is clicked,
' the second form becomes visible.
frmSummary.Show
End Sub
' Purpose: When the Display Second Form button is clicked,
' the second form becomes visible.
Private Sub cmdShowSummary_Click()
frmSummary.Show
End Sub
' Purpose: When the user closes this form, the second form is also
' unloaded from memory, thus ending the application
Private Sub Form_Unload(Cancel As Integer)
Unload frmSummary
End Sub
End Sub