Results 1 to 12 of 12

Thread: I need a little help with one of my programs

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2011
    Posts
    22

    I need a little help with one of my programs

    i am doing one of the project from visual basic 2010 book.These are the requirements:

    Workshop Selector:
    3 list boxes, 4 buttons, 2 labels.
    The application allows the user to select a workshop from lstWorkshop, Then select a location from lstLocation. Next btnAdd takes the selected workshop and location attached to a set amount of days and a registration fee and multiplies the days by a Lodging fee and outputs this number in dollar form. After multiple workshops/locations have been added btnCalc adds each of these and places them in lblTotal. The other two buttons are exit and clear which have already understand (of course the "easy" stuff)


    i have finished most of the codings and it works ok, but now i need to code btnCalc (the final calculation) and i am planing on using the For.....Next Loop to do this calculation

    my question is

    if this is my code for the btnCalc button

    how do i setup the intcount? over here saying saying 1 to 100 would be incurrect i think
    How do i set it to infinity or should i set it to infinity ?

    Code:
    Dim intcount As Integer        ' Loop counter
    Dim intTotal As Integer = 0    ' Accumulator
    
    'Add the numbers 1 through wat?
    For intCount = 1 To 100
    intTotal += intcount
    Next
    
    ' Display the sum of the numbers.
    lblcost.Text = intTotal.ToString("C")
    Last edited by newtovb1111111111111; Jul 3rd, 2011 at 07:55 AM.

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