+ Reply to Thread
Results 1 to 2 of 2

Filling listbox based on record dates

  1. #1
    Forum Contributor
    Join Date
    10-01-2008
    Location
    Eureka, CA
    Posts
    161

    Filling listbox based on record dates

    Hi, I have a listbox on a form that i would like to dynamically set the row source on. I have 3 option buttons on same form, Opt1, Opt2, OptFull. I'm using a combo box (CMBStaff) change event to fire the code, the appropriate table on sheet1 is found using this combo box selection. The first column of the table that is found has dates. The table data is created with formula and is always sorted in chronological order (Oldest dates first). If Opt1 is selected, I would like to see only items with dates less than a specific date - sheet4.range("A17"), if Opt2 is selected, I would like to see only items with dates more than a specific date - sheet4.range("A16"), and if OptFull is selected, the code I have works for that.

    I hope this isn't too convoluted, I commented the code below, that may be more helpful than the paragraph I've written above.

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    10-01-2008
    Location
    Eureka, CA
    Posts
    161

    Re: Filling listbox based on record dates

    Hi Guys, I was able to work out part of this by adding in a formula below each table to give me the row number of the first value that is greater than the date at sheet4.range("A17"), here is the formula I used, which i was able to copy over for each table to get the correct result The formula came courtesy of this forum also http://www.excelforum.com/excel-form...ch-a-cell.html

    Please Login or Register  to view this content.
    here is my updated code, I'm still working on the other one, will update once I've got it, thanks for the help, if there is a slicker approach, please let me know, this is what i've come up with

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Filling a listbox with unique entries in a row based on certain criteria
    By grzzzly in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-07-2013, 05:16 AM
  2. [SOLVED] Filling multiselect listbox based on closed workbook data
    By FKurzhals in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 08-23-2013, 02:56 PM
  3. [SOLVED] Auto filling dates based on previously entered dates and averaging numbers if dates equal
    By grambograham in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-11-2012, 03:21 PM
  4. Help with filling in data based on dates
    By tommypkoch in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-19-2012, 04:43 PM
  5. assistance with filling listbox.
    By zplugger in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 02-09-2011, 04:46 PM

Tags for this Thread

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