Results 1 to 14 of 14

Thread: [RESOLVED] calculation?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2007
    Posts
    99

    Resolved [RESOLVED] calculation?

    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
    Last edited by BrainA; Feb 17th, 2007 at 01:20 AM.

  2. #2
    Interweb adm/o/distrator Paul M's Avatar
    Join Date
    Nov 2006
    Location
    Australia, Melbourne
    Posts
    2,306

    Re: calculation?

    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.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2007
    Posts
    99

    Re: calculation?

    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

  4. #4
    Fanatic Member sessi4ml's Avatar
    Join Date
    Nov 2006
    Location
    Near San Francisco
    Posts
    958

    Re: calculation?

    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

  5. #5
    Frenzied Member
    Join Date
    Aug 2005
    Posts
    1,042

    Re: calculation?

    BrainA:
    if i can do projects at home to get more practice...
    How are you going
    to get more practice
    if we do the project for you??
    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.

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Feb 2007
    Posts
    99

    Re: calculation?

    Quote Originally Posted by sessi4ml
    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
    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?

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Feb 2007
    Posts
    99

    Re: calculation?

    VB Code:
    1. Private Sub cmdhourwage_Click()
    2.     'calculate Hourly Wage
    3.     txthourwage.Text = FormatCurrency(Val(txtrent.Text) * Val(txtfood.Text) * _
    4.     Val(txtcoloan.Text) * Val(txtcarloan.Text) * Val(txtcargas.Text) * _
    5.     Val(txtgasheat.Text) * Val(txtphone.Text) * Val(txtelec.Text) * _
    6.     Val(txtccard.Text) * Val(txtmisc.Text) / 60)
    7.  
    8. End Sub
    9.  
    10. Private Sub cmdyrsal_Click()
    11.     'calculate Yearly Salary
    12.     txtyearsal.Text = FormatCurrency(Val(txtrent.Text) + Val(txtfood.Text) + _
    13.     Val(txtcoloan.Text) + Val(txtcarloan.Text) + Val(txtcargas.Text) + _
    14.     Val(txtgasheat.Text) + Val(txtphone.Text) + Val(txtelec.Text) + _
    15.     Val(txtccard.Text) + Val(txtmisc.Text) * 365)
    16. End Sub
    17.  
    18. Private Sub txthourwage_Change()
    19.     txthourwage.FontBold = True
    20.     txthourwage.FontSize = 11
    21. End Sub
    22.  
    23. Private Sub txtyearsal_Change()
    24.     txtyearsal.FontBold = True
    25.     txtyearsal.FontSize = 11
    26. End Sub

  8. #8
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: calculation?

    please use [vbcode ] codehere [/ vbcode] when showing your code. thanks
    My usual boring signature: Something

  9. #9

    Thread Starter
    Lively Member
    Join Date
    Feb 2007
    Posts
    99

    Re: calculation?

    Quote Originally Posted by dclamp
    please use [vbcode ] codehere [/ vbcode] when showing your code. thanks
    sorry im knew..does it show now?

  10. #10
    Fanatic Member sessi4ml's Avatar
    Join Date
    Nov 2006
    Location
    Near San Francisco
    Posts
    958

    Re: calculation?

    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 ?

  11. #11

    Thread Starter
    Lively Member
    Join Date
    Feb 2007
    Posts
    99

    Re: calculation?

    Quote Originally Posted by sessi4ml
    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?

  12. #12
    Frenzied Member zynder's Avatar
    Join Date
    Nov 2006
    Location
    localhost
    Posts
    1,434

    Re: calculation?

    Quote Originally Posted by BrainA
    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

    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?

  13. #13

    Thread Starter
    Lively Member
    Join Date
    Feb 2007
    Posts
    99

    Re: calculation?

    Quote Originally Posted by zynder
    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?

    nope thats perfect! thx a lot

  14. #14
    Frenzied Member zynder's Avatar
    Join Date
    Nov 2006
    Location
    localhost
    Posts
    1,434

    Re: calculation?

    No problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width