Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Baltimore, MD, Maryland, USA
    Thanked 0 Times in 0 Posts

    Cycle Through a List Of Query Parameter Values (Office97 SR2)

    Hello EXCELVBA Friends:
    I am still struggling up this learning curve (I suppose I ought to take a course but ...). Anyway, we have here a list of case numbers of records that have been misfiled and we need to query our DB to bring back information about other records that were processed within +/- 5 minutes of each missing record. My current design has the user click a Data Validation arrow to select a case from themissing records list and then click a CmndClick button to set the query in motion (the query picks up the case # from the Data Validation cell). The macro brings back the correct information and prints it for the Clerk assigned to find that record. The list of misfiled records is refreshed every hour or so as the misfiled records are located. Now, the user wants to be able to click one button and have the macro cycle through the list, run the query, and print the output, one sheet for each missing record.
    I started to write some code for this and immediately got stuck because I did not know how to select the case numbers, one at a time, from the Data Validation List. Is this possible or do I need to use a List Box? In either case, I need some help because I have never used the List Box feature before.
    Any help/advice would be appreciated.
    <img src=/S/bow.gif border=0 alt=bow width=15 height=15>

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Dublin, Ireland, Republic of
    Thanked 0 Times in 0 Posts

    Re: Cycle Through a List Of Query Parameter Values (Office97 SR2)


    Assuming your Validation List is contained in a contiguous range would the following approach help : <pre> Dim oCell As Range
    For Each oCell In Range("ValidationList")
    MsgBox oCell.Value <font color=448800>' insert what process is required here.</font color=448800>

    Where "VaildationList" is the Address / RangeName of your data validation list.

    Andrew C

Posting Permissions

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