Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Visual Basic (https://www.askmehelpdesk.com/forumdisplay.php?f=469)
-   -   Visual basic quick questionnn about total price (https://www.askmehelpdesk.com/showthread.php?t=565385)

  • Mar 26, 2011, 05:41 AM
    katy_white
    Visual basic quick questionnn about total price
    Basically I'm really stuck on one part of the my coursework which is the total bit. Ive looked everywhere but I still have not found a coding that works. Basically I have 2 combo box's (cboUrban , cboUk) and 2 add buttons for each (btnAdd1, btnAdd2) and a lstTrack box. The user selects a song from each category and adds the song by clicking on add track button for each combo box the song then appears on the lstTrack box where a total has to be displayed. However I can not find a code for this could you please help mee!! Each track costs 1.00

    This is my coding so far for each button

    Public Class frmMusicStars


    Private Sub btnTrack1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTrack1.Click


    If (cboUrban.SelectedIndex.ToString >= 0) Then
    lstTracks.Items.Add(cboUrban.SelectedItem.ToString )

    End If


    End Sub

    Private Sub btnTrack2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTrack2.Click


    If (cboUk.SelectedIndex.ToString >= 0) Then
    lstTracks.Items.Add(cboUk.SelectedItem.ToString)
    End If

    End Sub

  • All times are GMT -7. The time now is 01:39 AM.