Piecework Form - Calculate Pay Rate And Average

Oct 20, 2009

This is the current incarnation of what I have:
'Program: Ch4E4.6
'Programmer: Jeff Pannell
'Date: October 1, 2009
'Description: This will allow for entry of a worker's name and the number of pieces completed. The program will then calculate a pay rate, but also determine an average and summarize number of pieces made, total pay and an average pay per person.

Public Class PieceworkForm
'Declaration of modular-level constants.
Const PIECE_RATEA_Decimal As Decimal = 0.5D
Const PIECE_RATEB_Decimal As Decimal = 0.55D
Const PIECE_RATEC_Decimal As Decimal = 0.6D
[Code] .....

So, my problem is that whenever the form is executed..a user would type in a worker name, and the amount of pieces made. I get a dollar amount earned and then a total pay, though they seem to be the same. More than likely I've got some sort of bad logic in there mathematically.

View 3 Replies


ADVERTISEMENT

DB/Reporting :: Calculate Rate For 3 Days In Different Rate Like Public Holiday,weekend And Normal For 1 Room?

Aug 19, 2009

how to calculate rate for 3 days in different rate like public holiday,weekend and normal for 1 room

View 2 Replies

Program A Form To Calculate Rainfall Total,average,maximum, And Minimum?

Mar 15, 2010

Im trying to programme a form to calculate rainfall total,average,maximum, and minimum.how do I create the input box that opens to input the info I cant seem to find it in the tool box. Am i Missing something, and how do I set a array to calculate?

View 2 Replies

Calculate Gross Pay Based On Hours And Rate

Nov 16, 2009

I have this code that is supposed to calculate the gross pay based on hours and rate, the program debugs without a problem but when I click the calculate button it gives me and answer of "0.00".

Public Class frmMain
Private Sub btnCalc_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCalc.Click
' calculates and displays a gross pay amount
Dim dblHoursWkd As Double
[Code] .....

View 1 Replies

Way To Calculate Average

Oct 11, 2009

Heres my [code]...

For example if I enter in 45, 45 and 89; I should get 55.75. But instead all I get is 55. How do I get the percentage?

View 2 Replies

How To Calculate Average Of Values

Jul 21, 2009

I have text1=a, text2=b, text3=c, text4=d, text5=e
Now I want to calculate the average of the values,

Here's a simple way
average=(a+b+c+d+e)/5
But what if i have values only in 3 textboxes, that means the code will still divide the sum of the values into 5, that will not be correct!

View 8 Replies

If Statement To Calculate The Average ?

Jun 7, 2012

My objective: to check the remaining btns in play and obtain the cash prizes in the remaining btns then calculate the average. It may seem simple but it actually isn't.

Here is what i have so far:

Private Sub btncase1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btncase1.Click
If usercase = 0 Then
usercase = btncase1.Text

[CODE]...

View 11 Replies

Calculate Average Dependent On Criteria?

Oct 10, 2011

I have a spreadsheet that has two columns (A and B) - Column A contains Month/Year and column B contains sales. I would like a bit of vba that will look in column A to find the month/year then calculate from column B the average sales for that period. So for example:

Date Sales
Jan 11 500.00
Jan 11 250.00
Mar 11 152.00
Apr 11 116.00

So in other words there can be a number of lines with the same date/year and the code will need to identify these and average all sales from column B associated with that particular date. I would like the output to appear in a summary table showing the total average sales for each particular month - perhaps this could be output to a new sheet?

View 1 Replies

Calculate The Average From Text Files

May 19, 2011

I'm in a bit of a pickle. I'm new to Visual Basic and I have been writing a simple program to rate movies. I'm stuck on calculating the average from the text file. The text file holds the numbers from 1 - 10 (ratings). I want my program button to add all the values from the text file and display the average from the total amount of ratings and display them into a text box.

[Code]...

View 11 Replies

Exercise On Sub Procedure To Calculate The Average?

Jun 22, 2010

Write a program to calculate the average of three exam marks. The input and output should be done by subprograms GetMarks and DisplayAverage respectively. the calculation should be done by a function, CalcAverage. This is my code:

Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click
Dim student As String, exam1 As Integer, exam2 As Integer, exam3 As Integer
Dim average As Double
lstResult.Items.Clear()

[code]....

View 2 Replies

Use A Function To Calculate The Average Of Those Numbers?

Apr 28, 2011

I'm trying to write a program that allows the user to enter 10 numbers into an input box and then the program will use a function to calculate the average of those numbers. I'm really illiterate when it comes to Visual Basic.

View 2 Replies

Calculate An Average From A Input Integer Within A Loop?

Feb 11, 2009

I'm looking for a way to calculate an average from a input integer within a loop. When the user enters something like -90, the average will be calculated using the previously input numbers.

View 4 Replies

Calculate Average Of Excel Table Using Program?

Jun 8, 2011

I want to calculate the average value of excel table readings 1 hr once... how do i import the sheet and how do i calculate the avg in vb.net?

View 4 Replies

Program To Calculate The Total And Average Rainfall?

Feb 14, 2010

For my programm I was told to do a programm to calculate the total and average rainfall. I have done so, but now I am supposed to use two function procedures to calculate the total and average rainfall. I can not seem to figure it out and it is very frustrating.

[Code]...

View 5 Replies

Call A Function To Calculate The Average Grade For The Class?

Apr 4, 2012

Write a program that reads in a set of grades for a class.The program takes in the number of students in the class from the user. When the Get Grades button is clicked the program then reads in a grade (0-100) for each student using an inputbox. The program should then display the percentage of students who pass and the percentage of students who fail.The program should call a function to calculate the average grade for the class. Then finally the result is then displayed.

Public Function GetPassRate(ByVal intGrade As Integer) As String
Do Until gradeCounter >= NumericUpDown1.Text
If intGrade >= 40 Then[code].......

View 7 Replies

Calculate Average Values From Text File Using Streamreader?

Mar 25, 2009

I'm trying to calculate an average no from data imported from a text file using streamreader. I'm not sure how the loop should read, and the result (average) I want to hold in a separate variable for future use.[code]...

View 1 Replies

Calculate The Predominant Or Average Colour In An Image File?

Jun 16, 2010

i am trying to code a program in vb.net that will calculate the predominant or average colour in an image file and then change the fillcolor of a rectangle to that predominant colour. I want to do that by getting the RGB value of each pixel, adding them up and then dividing them by the total number of pixels in the picture. This is the code that I wrote to do that.

[Code]...

I am a beginner programmer so this is basically the second time I fired up VS (not much experience). I searched the internet for the last hour but found nothing that might help me. I made sure every value is positive and changed all numerical variables from integer to decimal and I still get the error.I have absolutely no idea why this doesnt work but if I remove the "for" loop then the line written in bold works just fine.BTW this is my first post so scuze any mystakes I probably made.

View 9 Replies

VS 2008 Calculate An Average Value From Data Imported Using Streamreader

Mar 25, 2009

I'm trying to calculate the average hours worked from a set of data imported from a text file using streamreader. My problem is counting the number of entries and the total hours worked imported from a text file within a loop[.

[Code]...

View 2 Replies

VS 2010 Calculate Average Of Double Inside An Array?

Aug 18, 2011

I'm working with an API, for this I'm using this particular call: [URL]

If i use this, I will get all the .price values:

For i = 0 To .bets.Length - 1
With .bets(i)
Print(.price)
End With
Next

Can I calc the average .price value? I will need to sum all the values as well.

View 8 Replies

Call It Frame Rate Or Refresh Rate Of A Process?

Mar 25, 2012

How can I speed up a process? I see I should use timegettime, gettickcount, and queryperformance counter, but I have no clue where to start.

I guess you can call it Frame Rate or Refresh Rate of a process?

View 1 Replies

Payroll Calculator : Indicate If The Tax Is At Single Rate (18%) Or The Family Rate Of (15%)?

May 7, 2009

i am trying to indicate if the tax is at single rate (18%) or the family rate of (15%)This is what i got so far i could do the rest but just cant do the Mstatus part.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Name As String 'Name of employee
Dim hrWage As Double 'Hourly wage
Dim hrsWorked As Double'Hours worked this week

[code]....

View 1 Replies

DB/Reporting :: Include An Average In A Column Where The Average Ignores Zero Values In A Report Cell?

Jun 15, 2010

I want to include an average in a column where the average ignores zero values in a report cell where the column may have

17
19
0

[code].....

I want 16, not 11 so (17 + 19 + 12 + 13 + 19) / 5 not (17 + 19 + 0 + 0 + 12 + 13 + 19) / 7 Something like this if it would work.

=SUM(Fields!fieldname.Value) / Count(iif(Fields!count_cycle_per_hour.Value >= 0,Fields!fieldname.Value,0))

Essentially just average everything in the column NOT a zero?

View 4 Replies

Calculating Exponential Average With Out A Simple Moving Average

Sep 8, 2009

I'm working on a function to return a exponential average and there are a lot of examples of exponential moving averages but they all start with a moving average that is just the mean as a lead in to calculating the continuing moving average. I needed just a exponential average of a value set. After Googling my Bing off I still haven't seen anything so here is my attempt at a basic exponential average. Is this correct? Are there any errors? I have seen some text about adding a smoothing value to change the curve of the exponential average but not how that would be implemented.

[Code]...

View 5 Replies

Array Calculating Min, Max, And Average Output: Min, Max, And Average?

Mar 26, 2012

I put comments on the average output since I kept getting error messages about that. My out keeps saying:

Maximum value: 33
Minimum value: 33
what am I doing wrong?
Option Explicit On
Option Strict On

[Code]...

View 2 Replies

Displays The Average With An Appropriate Message Before The Average"?

May 10, 2011

I'm in a computer science class, and we are writing simple programs using Visual Basic 2008. I am really inept when it comes to this, as I have never done it before. I need to write a program that: "Asks the user for 5 numbers and computes the average. It then displays the average with an appropriate message before the average."

I have been really close with this, but I can't get the numbers to add up, then divide by 5, and display a pop up message.

View 13 Replies

Date Method - Calculate The Number Of Years For My Calculate Age Event Handler

Mar 30, 2009

I am trying to calculate the number of years for my calculate age event handler, however i am apparently missing a method or whatnot because im trying to calculate the age , can anyone suggest help on this. I need to subtract years to get my age but when i try the birthdate.Subtract (currentDate) method i get an error about not able to convert from LONG?

So below is what I have.

Private Sub btnCalculateAge_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculateAge.Click
Dim currentDate As Date
Dim BirthDate As Date
Dim Age As Long

[CODE]

View 7 Replies

Calculate The Total Cost For Gas For A Chevy And A Buick On A Form?

Feb 19, 2012

I'm trying to calculate the total cost for gas for a Chevy and a Buick on a form. The total miles is 21 for city and 33 for freeway. I'm also putting in the mpg for each, for city and freeway. How would I set up the labels to display the right amount? Do I use If Then statements?

View 9 Replies

C# - Calculate Difference Between Two Dates In Form `X Years, Y Months, Z Week, A Day`

Jul 10, 2011

How to get difference between two dates in Year/Month/Week/Day?

How do i calculate exact difference between to date including years, days, moths, weeks. Just like windows calculator does. ?

And represent like this 1 years, 1 months, 1 week, 1 day

View 3 Replies

How To Get Currency Rate From Web Service

Feb 8, 2010

I was trying to use the web service for currency rate to get the rate, although I have already add web reference to [url] but I still do not know how to retrieve it from there. I'm using asp.net vb.

View 1 Replies

Rate The Taste Of Drink From 1 To 10?

May 18, 2009

Each Taste Tester rates the two drinks on a scale of 1 to 10, with 10 being the best.I need to display the summary of results that contains the current results of the taste test.It should display the winner, the total number of taste tester and the average rating for each drink.My program has three forms.The main form, the input form and the summary form.For some reason, I can not get my results to display in the form. Plus it is not calculating my results correctly.[code].....

View 6 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved