how do you calculate Yearly Salary and Hourly Wage using two command buttons and textboxes? yearly salary has its own cmdbutton and hourly wage has its own
Printable View
how do you calculate Yearly Salary and Hourly Wage using two command buttons and textboxes? yearly salary has its own cmdbutton and hourly wage has its own
Uhm this sounds more like a project(school) thing you have to do... Is it? and if it is you should give us some criteria on what has to be added to the project.
its from my teacher but its not for a grade..i just asked my teacher if i can do projects at home to get more practice...
i have to create a budget calculator...i have to enter montly expenses into my textboxes and find YEARLY SALARY and HOURLY WAGE
Wage x Hours per weeks x months = per year
$10 x 40 hours per week x 4 weeks x 12 months = 19,200
You only two text boxes
Wage and hours per week
BrainA:
How are you goingQuote:
if i can do projects at home to get more practice...
if we do the project for you??Quote:
to get more practice
Why don't you show us what you have done so far (your code) and maybe someone here can guide you in the right direction.
i dont know what the wage and hourly wages is. im suppose to click the cmdbutton and its output will say how much my yearly salary and hourly wage is suppose to be so i can survive. i have other textboxes that say rent,loan, car gas...do you get it?Quote:
Originally Posted by sessi4ml
VB Code:
Private Sub cmdhourwage_Click() 'calculate Hourly Wage txthourwage.Text = FormatCurrency(Val(txtrent.Text) * Val(txtfood.Text) * _ Val(txtcoloan.Text) * Val(txtcarloan.Text) * Val(txtcargas.Text) * _ Val(txtgasheat.Text) * Val(txtphone.Text) * Val(txtelec.Text) * _ Val(txtccard.Text) * Val(txtmisc.Text) / 60) End Sub Private Sub cmdyrsal_Click() 'calculate Yearly Salary txtyearsal.Text = FormatCurrency(Val(txtrent.Text) + Val(txtfood.Text) + _ Val(txtcoloan.Text) + Val(txtcarloan.Text) + Val(txtcargas.Text) + _ Val(txtgasheat.Text) + Val(txtphone.Text) + Val(txtelec.Text) + _ Val(txtccard.Text) + Val(txtmisc.Text) * 365) End Sub Private Sub txthourwage_Change() txthourwage.FontBold = True txthourwage.FontSize = 11 End Sub Private Sub txtyearsal_Change() txtyearsal.FontBold = True txtyearsal.FontSize = 11 End Sub
please use [vbcode ] codehere [/ vbcode] when showing your code. thanks
sorry im knew..does it show now?Quote:
Originally Posted by dclamp
From your code comments, don't mix expenses (loan, gas) with wage or salary.
I think I understand, you are working the calculation backwards.
You are starting with expenses.
So, after you add up the total cost of living, then you will have what you need to survive....then find an education/ a job that will pay that amount.
And your question is ?
when i click the cmdbuttons there suppose to tell me what my YEARLY SALARY and my HOURLY WAGE is suppose to be to survive..do you get it?Quote:
Originally Posted by sessi4ml
Quote:
Originally Posted by BrainA
Total Monthly Expenses / 4 = Weekly Salary
Weekly Salary / Number of Working Days = Daily Wage
Daily Wage / Number of Working Hours = Hourly Rate
Total Monthly Expenses in a year = Yearly Salary
What else am i missing?
Quote:
Originally Posted by zynder
nope thats perfect! thx a lot :)
No problem. :)