+ Reply to Thread
Results 1 to 4 of 4

Do a search, display results in a userform with the ability to copy selected data.

  1. #1
    Registered User
    Join Date
    07-27-2011
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Do a search, display results in a userform with the ability to copy selected data.

    Hello

    I was looking for a way to search through database and display the results in userform and managed to find this particular thread.

    http://www.excelforum.com/excel-prog...-userform.html

    The samples provided were absolutely wonderfull and fit the criterias I was looking for.

    There is however one more item I would like to be able to do and that is to be able to select a specific cell within the listbox of the userform to have the ability to copy it and paste it somewhere else.

    Is this possible? Does it require changes to the macro or can i simply change something within the listbox configuration properties.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Do a search, display results in a userform with the ability to copy selected data

    Hello blkmagik,

    In the thread you are referring to, I replaced the ListBox with a ListView control for the poster. I assume you mean the ListView control and not the ListBox. It is possible to select (click) on a single row item and take some action. It would be helpful if you can post the workbook.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    07-27-2011
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Do a search, display results in a userform with the ability to copy selected data

    Quote Originally Posted by Leith Ross View Post
    Hello blkmagik,

    In the thread you are referring to, I replaced the ListBox with a ListView control for the poster. I assume you mean the ListView control and not the ListBox. It is possible to select (click) on a single row item and take some action. It would be helpful if you can post the workbook.
    Hi Leith

    Thank you for responding back, i do appreciate you taking the time to help me with this.


    I am providing you with a sample of the workbook. I made a slight change to the original macro to suit my needs.
    The change was on this particular line

    Set Wks = Sheets(2) 'SET TO LOOK IN WORKSHEET 2

    I wanted the macro to query Sheet2 as opposed to Sheet1


    So you mentioned replaceing the listBox with a ListView? Do i need to make changes to the properties or wil it
    the row item be selectable by default?

    Also i was wondering what the correct syntax would be if i wanted the macro to query a specific workbook on the local
    drive. E.g C:\Database.xls.

    I intend to have two workbooks, 1 that I would have the command button to query and paste the located data into
    and another workbook that holds the entire database.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    07-27-2011
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Do a search, display results in a userform with the ability to copy selected data

    ..bump.....

+ 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