+ Reply to Thread
Results 1 to 1 of 1

How to filter data before it is pulled into combobox/listbox AND remove data from listbox

  1. #1
    Registered User
    Join Date
    Surrey, England
    MS-Off Ver
    Office 365

    How to filter data before it is pulled into combobox/listbox AND remove data from listbox

    Hi guys,

    I have recently been building a call tracker (using a userform to obtain data of companies to ring (in certain dates etc) and submit new data to the call records).

    I am almost finished but there are a couple of obstacles I can't seem to overcome and unsure if it is just me or if they aren't doable:
    • I want a match to be required for the Company Name (as this box is the one which transfers to the data table and I only want the user to be able to submit a name which is in the preexisting list. However, when I type in the box and then delete it, it just errors out and doesn't allow me to press reset or close or click anything else. Is there a way that there can be an 'on error' piece of code which just removes the company name from the box if it doesn't match and allows the user to click around and do whatever (e.g. close or reset form) without this constant msg error? I tried making an on error code before but didn't seem to work. Could be a me issue though lol.
    • Currently there is code to populate the 'Daily List' with any companies that have been set to be called that day or earlier, but then the 'date to call' column is then populated with the most recent date written in the 'date to call' column of the data table. However if I make a new record with a future date (e.g. they call the company back and they request a new future call) this company remains in the daily call list because it had a date which was today/earlier, even though the next time they need to call is in the future so they shouldn't appear on the list at all as the latest record states they need to be called in the future. How do I get the latest 'to call' date to trump all previous records so the daily list only shows companies with their most recent 'date to call' as today or earlier? And if this was done, would the daily list remove a company if a new call had been completed for that company? (As the most recent 'date to call' would then not be today?).
    • There may be a time when a company has requested to please not be called again, or the final answer has been reached and thus they don't need to be called again and it would be unprofessional in both circumstances if they were accidentally called again. There is a frame with callback y/n and a date, and I wonder if there is a way where if 'No Callback' is selected, the "No" submitted in the data table causes the combo box 'companyname' to stop giving this company as an option (likewise the daily list, if the company was due to be called that day but has since had a record with 'no callback' selected, can this prevent the daily list from ever returning this company). I have tried a few things but the fact that a company has a previous record with 'yes' callback keeps preventing what I want to achieve.
    • Is there a way to 'refresh' the table that is populating the listboxes/combobox? E.g. I added a record with the date to call back today and nothing re-appears in the daily list box, but if I save and close then reopen excel it is there. Is there a way I can refresh the data so it immediately appears in this box? Or with a click of a button if needed?

    Hopefully this all makes sense, but I have attached the document as well.

    Thank you!
    Attached Files Attached Files

+ 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. [SOLVED] ComboBox to filter Listbox Data
    By TommyMurphy in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-02-2019, 12:25 PM
  2. ListBox to display data based on ComboBox value
    By no1uno in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-20-2017, 10:05 PM
  3. Using ComboBox on Userform to filter ListBox
    By burger160 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-17-2014, 05:03 PM
  4. Listbox to Listbox, no duplicates & submitting same UserForm data for each Listbox entry.
    By jamieswift1977 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-18-2012, 12:18 PM
  5. Replies: 2
    Last Post: 12-07-2012, 02:10 AM
  6. Search Data using Combobox Textbox and Listbox
    By Adrastia in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-31-2012, 05:27 AM
  7. [SOLVED] Copying Data Pulled from a Listbox to a New Sheet
    By JP777 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-27-2012, 11:43 PM


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