+ Reply to Thread
Results 1 to 4 of 4

Open listbox and doubleclick one line and run macro

  1. #1
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Open listbox and doubleclick one line and run macro

    HI I have below menutest.
    It have
    1. Button to show the window
    1. Button to update the menu in the listbox.
    Sheet 2 is called Refund
    Sheet 3 is called Saved Refunds
    Sheet 6 is used to update the menu.

    When i press update. The macro take the headers (Which have colorindex6 and have text) and copy them into sheet 6 cell A1 and down
    The reference from the listbox is to this sheet and column.
    So i can update the menu.

    What i need. Is a way when i doubleclick in the listbox, it will run the macro for this line. I guess this is called listindex
    The macro shall find if its number2 in the listindex. It shall find the number2 header in Sheet "Saved refunds" ( Which have colorindex6 and text)
    Then copy this header and the next 18 cells to sheet.
    "Refunds"

    Then i can doubleclick in my menu after the saved refunds and copy the one i click to Sheet "Refunds", and here i work more with it.

    I have attached a menusample, so you can compare with this one. Please have a look and see if you can help me with the doubleclick macro for this function.

    Sincerely
    Abjac
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Open listbox and doubleclick one line and run macro

    HI I came a step on the way now.
    Below code put the text i click on into cell G7 sheet 1. When there is text into this cell it run a macro(in below example a msg box) and after run it delete the text in G7.

    So what i need now to make it work.
    Is a code
    Which can compare the text in Sheet1 G7. find the matching text in Sheet "Saved Refunds".
    Column B where the colorindex is 6.
    Whenit find the match, it have to copy this cell and the next 18 cells after.
    to sheet "Refund" from cell A1 to A19.

    So i think the last can be possible

    Please´have a look and come with your suggestions.

    Thanks in advance

    Abjac


    Code put in the code view for the userform1

    Please Login or Register  to view this content.
    Last edited by abjac; 03-18-2013 at 10:14 AM.

  3. #3
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Open listbox and doubleclick one line and run macro

    I will allowe to make a new thread. I think the subject line dont cover anymore, because half of the result is all ready done. will put the link here thank.

    http://www.excelforum.com/excel-prog...html?p=3162955
    Last edited by abjac; 03-18-2013 at 10:27 AM.

  4. #4
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Open listbox and doubleclick one line and run macro

    HI The last code get solved in this thread. Thanks John really great

    http://www.excelforum.com/excel-prog...html?p=3163031

+ 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