Closed Thread
Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: VB

  1. #11
    Join Date
    Jul 2006
    Posts
    16,478
    Blog Entries
    75
    Rep Power
    143

    Re: VB

    If you attach a screen-shot of the form, we will at least know what data you are collecting.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #12
    mosgba is offline Newbie
    Join Date
    Nov 2008
    Posts
    15
    Rep Power
    0

    Re: VB

    this is exactly what i want ot do

    Write a Visual Basic program that allows users to enter the price of an item before tax (net value) and displays the price of the item after tax (gross value). Use the constant to define the VAT, which is 17.5, and use a variable to store the calculated gross price.

  4. #13
    Jordan Guest

    Re: VB

    You will need to make an event when your "calculate" button is clicked which will take the text value form textbox1 and multiply it by 0.175. Take that value and add it from the original value. Display this value in textbox2 or label2 or whatever you have created.

  5. #14
    Join Date
    Mar 2008
    Location
    The North Pole
    Posts
    13,174
    Blog Entries
    13
    Rep Power
    114

    Re: VB

    Whoopee. Time for my daily fix of criticising Jordan.

    First of all - good luck multiplying a text value by 0.175. You need to convert it to a float first (float.TryParse() for the boolean test, float.Parse() for the actual data).

    Secondly - why bother adding the value onto the original value? Just multiply by 1.175 instead and bang, you have your value.

    Quote Originally Posted by Jordan View Post
    Good members, like yourself, stick around and post for ages to come!
    Mr. Xav | Blog | Forums

Closed Thread
Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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