Results 1 to 5 of 5

Thread: Simple Application Help

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2002
    Posts
    6

    Simple Application Help

    New to VB but learning more and more everyday!

    Here's my Problem: A few buddies and I play Fantasy Football together. Me, being the aspiring young programmer, decide to make a little application to calculate my weekly score.

    Here is where things go wrong. I have 8 Text Boxes up and ready to. I have a cmd button to calculate the results and output them into a 9th Text Box. I've tried a few things but haven't been able to nail it. Please take a look at help me. I've attached the file.
    Attached Files Attached Files

  2. #2
    Addicted Member run_GMoney's Avatar
    Join Date
    May 2002
    Location
    Detroit
    Posts
    186
    to start you off here, you need to use
    VB Code:
    1. Val(txtQB.Text)
    in order to convert the text value that's entered into the textbox into a number. Same thing with all of the other textboxes. VB will recognize anything entered, even if it's a number, as a string. So using Val(Text.Text) should start you on your way.

    I'd help out some more being the Fantasy Nut that I am but I gotta take off. Good Luck.

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2002
    Posts
    6
    Where would I put that?

    In the code for the textbox?

  4. #4
    Hyperactive Member
    Join Date
    Jun 2002
    Location
    Tulsa,Ok
    Posts
    262
    First,

    You need to declare your variables unless they are declared somewhere other than here.

    Second, Your assignment statements are backwards in your change events.

    I have changed a little on your form to show you how to go about this.

    I would just do all your calculations from the from the cmdCalculate button and not mess with having all the variables you would need in this project.

    Jerel
    Attached Files Attached Files

  5. #5

    Thread Starter
    New Member
    Join Date
    Aug 2002
    Posts
    6
    I see. Thanks for the help!

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