New Excel Forum

This forum has been moved to TeachExcel.com

Ask all future questions in the New Excel Forum.

ExcelKey

data from listbox to excel sheet

Macros, VBA, Excel Automation, etc.

data from listbox to excel sheet

Postby hilfesuch » Sun Dec 27, 2015 9:55 am

Hi all,

I have a listbox in a userform with several columns.
I’m trying to set up a code for transfer button, which allow me to copy the selected rows in a listbox and to past them in the excel sheet.
I want to transfer only the selected rows. For example I highlight the first rows and click the transfer button to copy the rows in the excel sheet "results" and then the second row etc..

Any help will be grateful

Thank you in advance
  • 0

hilfesuch
Rookie
 
Posts: 1
Joined: Dec 27, 2015
Reputation: 0
Excel Version: 2007

Re: data from listbox to excel sheet

Postby NoSparks » Sun Dec 27, 2015 11:44 am

That's pretty vague.

Think your best bet is to start the macro recorder.
Manually, do what you want the transfer button to do.
Stop the macro recorder.

There's your required code.

It will undoubtedly need "tuned up" so it can accommodate different selections from the list box each time it's run, but it will be closer than anything anybody could suggest based on the info provided.

Good luck.

PS: I see you are new to these forums and obviously neglected to read the rules at any of them.
They all have the same requirements about cross posting and refer you to http://www.excelguru.ca/content.php?184 for an understanding of why.
Would suggest you comply before being ignored everywhere.
  • 0

NoSparks
Excel Hobbyist
 
Posts: 637
Joined: May 28, 2014
Reputation: 103
Excel Version: 2010


Return to Macros and VBA Questions

Who is online

Users browsing this forum: No registered users and 221 guests

cron