Macros & VBA Training Series Part 3:

How to Create a Userform to Export Worksheets

Double-click video to view in Full Screen HD.

Download the file used in this video:

The Exports Sheets Userform.xlsm (216.4 KB)

Bonus: How to Export The Selected Items Only

In this video I explain how to set the listbox multiselect property to allow the user to select multiple items. We then add code to the Export button’s Click event to only export the selected sheets. We do this with an IF statement.

Macros & VBA Training Series

Video 1

Intro to VBA:
Writing Your First Macro

Video 2

Automating Tasks:
The Summary Report

Video 3

Userforms:
The Exports Sheets App

How features can we add to the userform?

Please leave a comment below with your answer, and any questions.  Thanks!​

Click Here to Leave a Comment Below 110 comments
JP - September 13, 2017

Excellent material. Love it

Reply
Satyajit Roychaudhury - August 30, 2017

Excellent video. Very useful.

Reply
Agnes - August 14, 2017

Really good. Please do some more series. I would love to see some more topics on automation i.e. Get and Transform data to read in spreadsheets and ways to email and save results.
Thank you.
Agnes

Reply
Paul - June 17, 2017

Thanks Jon! Your lessons are presented in clear, easy to understand modules. I would recommend your training to anyone wanting to learn VBA.

Reply
asim siddiq - April 16, 2017

Jon Acampora, your are a Great Teacher!

Reply
Scott H. - April 13, 2017

Great teaching!

Reply
Catherine - March 13, 2017

Great training video, wish I knew about these courses sooner.

Reply
Ken - March 6, 2017

Thanks Jon, this is great stuff! Especially for someone who was scarred by their computer science professors in their college days. I am looking forward to the info on the Pro Course.

Thank you!

Ken

Reply
Jess - February 21, 2017

Jon,

Another Great Presentation! I received an error when I ran my code but it ran fine once I made sure none of my sheets were hidden. Go figure! Anyway, thanks and awaiting your email regarding the pro series. It will be nice to use loops in vba than writing long formulas in excel.

Jess

Reply
    Jon Acampora - February 28, 2017

    Hi Jess,
    Yes, I think I forgot to mention that the sheets will need to be visible in this case. We can also add code to unhide and then hide sheets if the macro needs them to be visible. Not all code for a sheet requires the sheet to be visible.
    I look forward to having you join us for The VBA Pro Course. Thanks again! 🙂

    Reply
Joan - February 16, 2017

So nice video. I want to learn more about VBA. Thank you very much!

Reply
Damiano - February 10, 2017

Hi Jon, your videos are very useful and well explained: a simple and easy way to learn VBA. I’d like to have more info about the VBA Pro Course. Thanks

Reply
    Jon Acampora - February 15, 2017

    Thank you Damiano! I really appreciate the nice feedback. I sent you an email with more info on the course. I look forward to having you join us.

    Reply
Kristina - February 7, 2017

I tried this on a monthly report I sent out. when I got the to ME.

Listbox was not an option, and it keeps giving me an error. I don’t know how to get LISTBOX to show in my choices under ME.

Any helP?

Reply
    Jess - February 21, 2017

    Kristina,

    Did you rename your listbox object to ListBox_Sheets? I think me. refers to the userform and ListBox_Sheets has to be an object on the userform for it to appear in the drop-down.

    Jess

    Reply
kapil - December 27, 2016

Hi John, I want to export data from a workbook.

Like if i am having region data East 1 est 2….. west 2
i want to export it in east 1 sheet… west 1 sheet..

Also i want to learn more. what’s your fee and how can i get video.. please let me know

Thanks
Kapil

Reply
    Jon Acampora - December 27, 2016

    Hi Kapil,
    Great question. That is a very common task to split data into sheets within the workbook.

    I will be sending you more info about the VBA Pro Course in just a few days. Stay tuned.

    Reply
Miera - November 13, 2016

Hi Jon,
I am very greatful and delighted of your effort and expertise in excel. I’m a beginner and benefiting greatly from your simply but very indept tutorials.

Thanks again.

PS: cant wait for your VBA Pro course.

Reply
Bernardo moniz da Maia - November 9, 2016

thank you for the explanation. very useful.
i will wait for or next emails regarding the beginner to pro.
best regards

Reply
Baliong - November 1, 2016

Thanks John for the Links, I’m still learning and its becoming very interesting, as I do project monitoring and evaluation in my daily work and I look after HIV – AIDS patient database so I’m working on a userform that can help enter data, store data and export data to word or PDF to report to my bosses, I’m still working on it. Every thing was done on assumptions I did not really understand the basic things about macros and VBA code deveopment but I’ve been searching all over the web to see what people have done and try applying for my self thanks alot again John.

Reply
Baliong Erewiong - October 31, 2016

I appreciate your efforts, its very helpful on my end because I’m just a begginer and I do project monitoring and Evaluation so I’m beggining to see the importance of excel and VBA

Reply
Don Willhoit - October 12, 2016

Great 3 video intro! Can’t wait for the full course. Thanks.

Reply
Victor - October 2, 2016

Extremely well explained. Thank you very much!

Best Regards,
Victor

Reply
Rajan A - August 30, 2016

Hello Jon,
Wonderful explanation. Video in all respects is great.
Request to mail me details of your wonder full learning modules.
Thanks and regards,
Rajan

Reply
YasserKhalil - August 25, 2016

You are a great teacher John. Really wonderful presentation
I am admired of your website

Reply

Leave a Reply: