Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 150,094 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 1,814 people online right now. Registration is fast and FREE... Join Now!




Payroll Tool

 
Reply to this topicStart new topic

Payroll Tool, Im terrible at VB and need to code a payroll tool ive made the aplicia

Rating  5
NickCantCodeVB
22 Apr, 2008 - 06:47 PM
Post #1

New D.I.C Head
*

Joined: 22 Apr, 2008
Posts: 2

There is three tax brackets
Gross pay less then 1000 is 16%
Gross pay between 100 and 1500 (inclusive) is 26%
Gross pay greater than 1500 is 33%
Net pay = Gross Pay - (Gross Pay * Tax Rate)

Im completely lost
IPB Image
"Jour" Should be "Hour" there was a typo
CODE
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Dim hours As Decimal
            Dim wage As Decimal
            Dim grosspay As Decimal

            Dim tax1 As Decimal
            Dim tax2 As Decimal
            Dim tax3 As Decimal
            Dim net_pay As Decimal


            grosspay = hours * wage

            If grosspay < 1000 Then
                tax1 = grosspay * 0.16
        ElseIf grosspay >= 1000 or <= 1500 Then
                tax2 = grosspay * 0.26
                End if gross pay > 1500 Then
            tax3 = grosspay * 0.33

        End Sub
    End Class


This post has been edited by NickCantCodeVB: 22 Apr, 2008 - 07:22 PM
User is offlineProfile CardPM
+Quote Post

NickCantCodeVB
RE: Payroll Tool
22 Apr, 2008 - 07:10 PM
Post #2

New D.I.C Head
*

Joined: 22 Apr, 2008
Posts: 2

Hi-Lo guessing game

IPB Image
^
Label 4 would either say "Too High" "Too Low" or "Correct"
im lost it says post your code but I don't have one to post I need help to code either of the two or a start or something

This post has been edited by NickCantCodeVB: 22 Apr, 2008 - 07:15 PM
User is offlineProfile CardPM
+Quote Post

dawmail333
RE: Payroll Tool
24 Apr, 2008 - 03:50 AM
Post #3

D.I.C Head
Group Icon

Joined: 2 Jul, 2007
Posts: 52


Dream Kudos: 100
My Contributions
QUOTE(NickCantCodeVB @ 22 Apr, 2008 - 08:10 PM) *

Hi-Lo guessing game

IPB Image
^
Label 4 would either say "Too High" "Too Low" or "Correct"
im lost it says post your code but I don't have one to post I need help to code either of the two or a start or something


Whoa man, that should have gone in a new post (actually, did you say one or the other?). However though, you're new, so I'll personally forgive you.

That post your code bit is where applicable. Obviously, for my last thread, I have no code to post, so that wasn't applicable!

OK, I'll talk about this one:

The program is going to pick a number between 0 and 100. For this purpose, there is a code snippet you can insert. (If you don't know how to insert a code snippet, right click where you want it, it's under Math).

Now, that's solved. Next part, you need to accept the user's input and determine whether it's higher, lower or the same, using the operators <>= (not in that order).

That's all you need to do, just remember to handle errors: the user might try typing in the number as a word for example, which could throw exceptions. Always setup procedures to catch potential errors: never fully trust the client/user.

That should help you.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 12:10AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month