vba code to copy list box contents

  • I have a list box on Sheet 1 showing Monday thru Friday. I Need code that will copy the user selection to row 7 of the first empty column on Sheet 2.

  • The code will depend upon whether you are using a Form Control Listbox or an ActiveX one. Attach your workbook

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

  • Try the attached.


    On Sheet 1 the cell linked to the List Box is E2, The list of weekdays starting in J2 is used to populate the list box (you can move it anywhere, even to a hidden sheet, it is a named range "Days". That named range is also used in the code.


    The code assigned to the ListBox is

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!