+ Reply to Thread
Results 1 to 3 of 3

Tom Ogilvy or anyone else who can help!

  1. #1
    Jennifer
    Guest

    Tom Ogilvy or anyone else who can help!

    Hi Tom,
    Thank you for your advice. I am not sure what is happening or if I placed
    your code correctly but the form comes up but the listbox is no longer filled
    when the user makes a choice from the combo box (cmbgrower) The following
    shows you how I placed your code. Sorry but I need more help.

    Private Sub LoadData()

    If grower = source.Cells(index, 4) And _
    source.Cells(index, 3) >= CDate(dtStart.Value) And _
    source.Cells(index, 3) <= CDate(dtFinish.Value) Then

    With lstData
    .Clear
    grower = cbogrower.Value
    For index = 2 To source.Rows.Count
    If grower = source.Cells(index, 4) Then
    .AddItem source.Cells(index, 1) ' ID
    .List(.ListCount - 1, 2) = source.Cells(index,
    eBoxes.ProduceItem) 'Date
    .List(.ListCount - 1, 3) = source.Cells(index,
    eBoxes.BoxesPurchased) ' Fruit
    .List(.ListCount - 1, 4) = source.Cells(index, eBoxes.Date)
    'Boxes
    .List(.ListCount - 1, 5) = source.Cells(index, eBoxes.Inv)
    'Boxes
    .List(.ListCount - 1, 6) = source.Cells(index,
    eBoxes.GrossPrice) 'Boxes
    .List(.ListCount - 1, 7) = source.Cells(index, eBoxes.Frt)
    'Boxes
    ' .List(.ListCount - 1, 8) = source.Cells(index,
    eBoxes.NetGross) 'Boxes
    ' .List(.ListCount - 1, 9) = source.Cells(index,
    eBoxes.FormID) 'Boxes
    End If

    Next

    End With
    End If
    End If
    End Sub
    --
    Though daily learning, I LOVE EXCEL!
    Jennifer

  2. #2
    Jennifer
    Guest

    RE: Tom Ogilvy or anyone else who can help!

    OK, THAT WAS A VERY ROOKIE ?, SORRY I FIGURED IT OUTAFTER STAIRING AT IT LONG
    ENOUGH. SORRY AGAIN!
    --
    Though daily learning, I LOVE EXCEL!
    Jennifer


    "Jennifer" wrote:

    > Hi Tom,
    > Thank you for your advice. I am not sure what is happening or if I placed
    > your code correctly but the form comes up but the listbox is no longer filled
    > when the user makes a choice from the combo box (cmbgrower) The following
    > shows you how I placed your code. Sorry but I need more help.
    >
    > Private Sub LoadData()
    >
    > If grower = source.Cells(index, 4) And _
    > source.Cells(index, 3) >= CDate(dtStart.Value) And _
    > source.Cells(index, 3) <= CDate(dtFinish.Value) Then
    >
    > With lstData
    > .Clear
    > grower = cbogrower.Value
    > For index = 2 To source.Rows.Count
    > If grower = source.Cells(index, 4) Then
    > .AddItem source.Cells(index, 1) ' ID
    > .List(.ListCount - 1, 2) = source.Cells(index,
    > eBoxes.ProduceItem) 'Date
    > .List(.ListCount - 1, 3) = source.Cells(index,
    > eBoxes.BoxesPurchased) ' Fruit
    > .List(.ListCount - 1, 4) = source.Cells(index, eBoxes.Date)
    > 'Boxes
    > .List(.ListCount - 1, 5) = source.Cells(index, eBoxes.Inv)
    > 'Boxes
    > .List(.ListCount - 1, 6) = source.Cells(index,
    > eBoxes.GrossPrice) 'Boxes
    > .List(.ListCount - 1, 7) = source.Cells(index, eBoxes.Frt)
    > 'Boxes
    > ' .List(.ListCount - 1, 8) = source.Cells(index,
    > eBoxes.NetGross) 'Boxes
    > ' .List(.ListCount - 1, 9) = source.Cells(index,
    > eBoxes.FormID) 'Boxes
    > End If
    >
    > Next
    >
    > End With
    > End If
    > End If
    > End Sub
    > --
    > Though daily learning, I LOVE EXCEL!
    > Jennifer


  3. #3
    Tom Ogilvy
    Guest

    Re: Tom Ogilvy or anyone else who can help!

    You have to remember, I am only guessing at what your objects are, what
    values they hold and where your data is located - Good you were able to
    figure it out. I wasn't ignoring you - just saw your posts.

    --
    Regards,
    Tom Ogilvy


    "Jennifer" <[email protected]> wrote in message
    news:[email protected]...
    > OK, THAT WAS A VERY ROOKIE ?, SORRY I FIGURED IT OUTAFTER STAIRING AT IT

    LONG
    > ENOUGH. SORRY AGAIN!
    > --
    > Though daily learning, I LOVE EXCEL!
    > Jennifer
    >
    >
    > "Jennifer" wrote:
    >
    > > Hi Tom,
    > > Thank you for your advice. I am not sure what is happening or if I

    placed
    > > your code correctly but the form comes up but the listbox is no longer

    filled
    > > when the user makes a choice from the combo box (cmbgrower) The

    following
    > > shows you how I placed your code. Sorry but I need more help.
    > >
    > > Private Sub LoadData()
    > >
    > > If grower = source.Cells(index, 4) And _
    > > source.Cells(index, 3) >= CDate(dtStart.Value) And _
    > > source.Cells(index, 3) <= CDate(dtFinish.Value) Then
    > >
    > > With lstData
    > > .Clear
    > > grower = cbogrower.Value
    > > For index = 2 To source.Rows.Count
    > > If grower = source.Cells(index, 4) Then
    > > .AddItem source.Cells(index, 1) ' ID
    > > .List(.ListCount - 1, 2) = source.Cells(index,
    > > eBoxes.ProduceItem) 'Date
    > > .List(.ListCount - 1, 3) = source.Cells(index,
    > > eBoxes.BoxesPurchased) ' Fruit
    > > .List(.ListCount - 1, 4) = source.Cells(index,

    eBoxes.Date)
    > > 'Boxes
    > > .List(.ListCount - 1, 5) = source.Cells(index,

    eBoxes.Inv)
    > > 'Boxes
    > > .List(.ListCount - 1, 6) = source.Cells(index,
    > > eBoxes.GrossPrice) 'Boxes
    > > .List(.ListCount - 1, 7) = source.Cells(index,

    eBoxes.Frt)
    > > 'Boxes
    > > ' .List(.ListCount - 1, 8) = source.Cells(index,
    > > eBoxes.NetGross) 'Boxes
    > > ' .List(.ListCount - 1, 9) = source.Cells(index,
    > > eBoxes.FormID) 'Boxes
    > > End If
    > >
    > > Next
    > >
    > > End With
    > > End If
    > > End If
    > > End Sub
    > > --
    > > Though daily learning, I LOVE EXCEL!
    > > Jennifer




+ Reply to Thread

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1