• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to pass selected list items from listbox to another procedure

Hello Forum members,

Greetings!

I have one scenario where I need some guideline based on your expertise

How do I pass list of items that are selected from a list box (the list includes worksheet tabs with specific names, for example ws1, ws2, ws3, ws4, ws5 and so on..) when user clicked on a command button in userform(usrFrmemail) the selected only list items(if I select ws1, ws2 need to pass to proc in other module.

I have a module based procedure where I am preparing a dynamic workbook subset with few tabs such as selected tabs from listbox.

In a module I have following line of code where a new sub workbook is prepared dynamically but dependent on passed selected list items.

Sub ExportEmail()

Sheets(Array("EMailCover", <dynamic list value>, <dynamic list value>)).Copy
Set newWB = ActiveWorkbook

Please let me know, any help is appreciated.


Regards,
Mahendra
 
Back
Top