Closed Thread
Results 1 to 3 of 3

Listbox selection as a parameter in data extraction macro.

  1. #1
    abhay_547
    Guest

    Listbox selection as a parameter in data extraction macro.

    Hi All,

    I have the below macro which I have recorded for importing the data from SQL Server table. I have a userform in which I have list box I am populating that listbox with some values from another sql server table. Now what I am doing is, while importing the data from sql table I select a criteria now I want the user to select multiple items in listbox and my below macro should consider that selection and extract the data accordingly. As of now below mentioned code works fine with single selection in listbox but when I select multiple items in my listbox. It shows error. Please help.

    Please Login or Register  to view this content.
    Currently my listbox's MultiSelect property is set to 0. If I set it to 1 or 2 the above macro doesn't work.

    Please have a look at the attached screenshot. This will help you to understand my issue in better way.

    Thanks for your help in advance.
    Attached Images Attached Images

  2. #2
    abhay_547
    Guest

    Re: Listbox selection as a parameter in data extraction macro.

    Hi All,

    I have got the below code from an extensive google search which I think can help us in selecting the listbox items as a parameter / criteria in the query macro posted by me in the above thread.

    Code 1 :
    Please Login or Register  to view this content.
    Code 2 :
    Please Login or Register  to view this content.
    Code 3 :
    Please Login or Register  to view this content.
    Code 4 :
    Please Login or Register  to view this content.
    Code 5 :
    Please Login or Register  to view this content.
    Thanks a lot for your help in advance.
    Last edited by abhay_547; 05-20-2010 at 10:39 AM.

  3. #3
    abhay_547
    Guest

    Re: Listbox selection as a parameter in data extraction macro.

    Hi All,

    Finally I got the below code through the extensive google search which I think can be used with SQL. I just need your help it to replicate in my main macro

    Please Login or Register  to view this content.
    Thanks a lot for your help in advance.

Closed 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