Consulting

Results 1 to 2 of 2

Thread: adding in list box

  1. #1

    adding in list box

    Dear all,

    I am reading numbers from two combo box in a form and wanna see the product of those nos in the list box...

    What I am doing wrong????????

    [VBA] Private Sub UserForm_Initialize()
    With cboGenset
    .List() = Range("Genset").Value
    End With

    With cboQtyG
    .List() = Range("Qty").Value
    End With

    Me.txtkWe.Value = ""


    End Sub


    Private Sub cboGenset_Change()
    Select Case cboGenset
    Case Is = "4L20"
    cbokWe.List() = Range("G4L20").Value
    End Select
    End Sub


    Private Sub cbokWe_Change()
    Dim x As Integer
    Dim y As Integer
    Dim z As Integer
    cbokWe.Value = y
    cboQtyG.Value = x
    z = (x * y)
    Me.txtkWe.AddItem (z)

    End Sub
    [/VBA]
    Please help...
    Last edited by johnske; 10-31-2005 at 04:47 AM. Reason: edited to include VBA tags

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    What is what control? Post a workbook.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

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