Not Only This but all of your tutorials are awesome ! Your way of Explaining is great and You are Best Online Instrutor for me ever. Wish You Good Luck !
Leila, I think I'm in love with you. My goodness you make Excel and VBA for that matter, so damn beautiful. In all seriousness, appreciate the sharing of knowledge, have learnt a ton. ✌🏾
Wow! what a great teacher. You are wonderful. I have just started a course which requires me all these things that you're teaching and it has been so resourceful to me. Thank you
Thank you so much for your help on this topic and the many others you have shared. I will definitely be using this code in an upcoming project. One thing that I would add is a message box to alert the user if they have not chosen a sheet and then hit the Preview button. When one runs the macro an error message pops up. I added the following and it did the trick. Thanks If c > 0 Then Sheets(SheetArray()).PrintPreview 'If you'd like to print out ' Sheets(SheetArray()).PrintOut Else MsgBox "No Sheets have been selected" End If
Hi Leila.. thanks.. great video and useful tip and tool to add to any workbook for easier previewing and printing. I can think of many parallel uses, such as a choice to save selected sheets to PDF or save selected sheets as a separate workbook, etc. Always a pleasure to view your videos and practice learning your techniques and implementing your ideas in my own work product. Thumbs up!
Thanks Leila.. glad to be part of the process. I built your code into a workbook with some hidden sheets and realized the need to trap for that and not load them to the list box, otherwise the PrintPreview or PrintOut routine fails, if a hidden sheet is selected for processing from the list. I added this code.. problem solved. For Each ws In Worksheets If ws.Visible = xlSheetVisible Then Me.ListBoxSh.AddItem ws.Name End If Next ws Before following your channel and taking your VBA course, I wouldn't have known where to begin, let alone being able to solve the problem for myself. Thanks for all your help and inspiration. Looking forward to your next video. Thumbs up! PS - Also added this code to trap for attempting to print with nothing selected in list box.. the fun never ends with VBA.. haha!! If c = 0 Then MsgBox "Nothing was selected.. try again!" Else Sheets(SheetArray()).PrintPreview End If
Why do you not use integer for i? By the way I got so much value from this video, I didn't know about the Locals window, Break, icons for macros, now I know byte is 0-254 and only takes up 1 byte instead of 2 for integers, I learned to populate listboxes and the difference between selections allowed, WOW. Thank you!
hi maam Leila Gharani, nice video tutorial... and please do a tutorial on how to create a bold function in excel, on how to bold a specific text in a string formula... thanks in advance.
@@LeilaGharani Dear Leila my be you can advise, after each opening and closing document , activexbox change size, become smoler and smoler . How to protect it ? Or lock . Thank you .
Very helpful video. How can I add another button which would print (or select) all sheets? Just as a shortcut if I would print them all more often. Without loosing preview function.
This is great! How would you filter that list in the list box based on certain cells on each sheet having data? (automatic instead of manual selection?)
Regarding your little "hack" at the end. You could have made the code in a module and had sheet_activate run the module sub, then in workbook_open link to the same module sub. That way you don't force the user to a different sheet, and you can open the workbook on print sheet and it will be updated
Hei. I am just facing one issue with this tutorial that is not matching mine. The cursor does not select the sheet inside the list box. Only when I go out of the listbox boundary and click something else outside, does the selection update. Why is that?
Wonderful tutorial!! I am still very new to this, is there a way to have your list box to show only certain tabs? Looking to not show my first two tabs but to show the rest. Thank you!
Greetings to you, Miss Truth. You have a wonderful and distinctive method of explanation and in a smooth language. I have Excel sheets for printing via Listbox, but after printing there is always a problem with the rest of the codes, so how can I send you the file. Sorry for the poor expression, it's just a translation
This has been very helpful. I'm stumped on how to do this same thing, but automate print/saving to PDF. Specially using ExportAsFixedFormat. Any suggestions?
HI Leila Gharani... I really appreciate on your effort to make this video. It's teach me a lot of new thing to do in excel. Really thanks for it. HErewith I have a query that I would like to get your assitant on it... I would like to create in excel sheet the population of my neighborhood by create the command box or tex box the number of house. When ever we click the textbox or command box with the number of house, the detail of the owner of the house can be display either in print preview or in tabulation. CAn you assist me on it. I have to solve it, but unable to get it... appreciate your assitant on it. Thank you...
Hi Leila! I want to do this, but for several specific print areas within the same sheet. I can’t figure out how to do this. I created defined names for the different print areas and put them in an activex list box, but i’m not sure how to write the VBA code for it or what to do next.
Hi Leila, is it possible to use a multi select enabled list box to "insert" criteria for sumproduct ? ... ie I want to use sumproduct to do a sum based on OR criteria logic and point to the listbox selection ?
Hi Leila, thanks for sharing the knowledge and helping others. I used this type of code to make a child activity record where teachers can enter the child activity per session. All is inputted from a central sheet which I would like to keep visible but not listed with in the list box is that possible please.
Hi Leila. I must say that you're my heroine 😁. I applied step by step the way to print many workseets at the sametime but I have an issue. Do hou have a webside where I could expose my problem? Thanks, François Montréal, Quebec(Canada)
It would probably be best if you would post it on Microsoft's Tech Community Platform for Excel: techcommunity.microsoft.com/t5/excel/bd-p/ExcelGeneral
Great tutorial! I did it and it worked while testing. However now it does not work properly for a "random"selection. Keeps saying "error 1004". Any ideas of what I'm doing wrong?
Hi Leila, I have been following your channel for a while now and I would really appreciate if you could help me with printing in landscape as well as portrait within the same worksheet. I could print one-one page but it would take a lot of time especially if I have to print the same document again and again. So how will you approach this problem? I would love to hear your thoughts. Thanks.
This Tutorial was Impressive and I am in Learning stage. I wonder Is it possible to print in single page, different sections of same sheet. for example: In sheet1 I want to print cells A1: B5 and C10:F20 . Just in my mind. Thank you.
Thanks a lot for your amazing way in explanation these topics. I have a list with some items that are dynamically connected to the sheet it’s located on and want to print that sheet for each item in the list, is it possible to do that using macro?
Leila your videos are excellent and the way you softly and slowly speak is absolutely amazing for viwers around the Globe. I have an excel with data of more than 100 teacher.. Now I want to print separate page for each teacher and hand it over to them.. One way is to filter teacher and print which would take to filter 100 times.. Is there a way or trick i command to print teacher wise data with few click
@@LeilaGharani is there any way you can help me out how to do this? I am trying this for already over 2 weeks and cant find a way :/ So I want to select multiple sheets and also print range in those selected sheets..thank you in advance!
Leila, I would like to embed an insurance rates calculator on my website so customers can can check their insurance quotes. How can I do that or can I use your services in the respect? Thanks.
Thank you very much for this trick and one more thing mam how to view vba code if Excel is locked by unviewable project shared workbook ...how to crack it ...looking for your reply
Regarding printing: I got a table that fits in a single page when printed. The table has titles in the top row. When choosing a value from the top left filter in the top row of the table, the dependent array below the filter gets filtered accordingly, and so the whole table now has less rows than when it's unfiltered. What's the VBA code to automatically select the first value from the filter, and automatically print on paper the filtered table; then select the second value from the filter, and automatically print on paper the filtered table; and so forth until you have finished printing on paper all available values from the filter? Thanks in advance.
Grab the file I used in the video from here 👉 pages.xelplus.com/vba-listbox-file
Very Well Explained, VBA is a life saver for people like us, those who spend their life in spreadsheets....
Very true :)
Once again delivered with the "Master Stroke " waiting for next one
Wow! Thank you! I'm glad you enjoy the tutorials.
Your efforts concerning several MS Excel videos are always appreciated.... well done...
Thank you Towfeek! Also thank you for your support of my videos.
Not Only This but all of your tutorials are awesome !
Your way of Explaining is great and You are Best Online Instrutor for me ever.
Wish You Good Luck !
Thank you Banaras Ali Aziz! I'm very happy you find the tutorials easy to follow.
I love you Leila... Justo lo que buscaba... saludos desde Mi México Máxico (Mágico)
Your videos are always a great source for being more efficient. Thanks for sharing.
Thank you and you're very welcome.
Oh my goodness, that's something I needed to today. I had a 'print all' to PDF button, now I can enable the user to select sheets! Thanks so much!
Sounds great :)
Leila, I think I'm in love with you. My goodness you make Excel and VBA for that matter, so damn beautiful. In all seriousness, appreciate the sharing of knowledge, have learnt a ton. ✌🏾
I'm glad to hear that the videos are helpful Steve.
Excellent .... Thanks Leila :)
Thanks you Mem for easy & ooosam tutorial 👍👍
Thanks a lot Leila for this great tuto
You're very welcome Aarab. Thank you for your support.
Wow! what a great teacher. You are wonderful. I have just started a course which requires me all these things that you're teaching and it has been so resourceful to me. Thank you
You're very welcome. Good luck with the course Akanlu.
Great tutorial of VBA! Thanks a lot, Leila!!
Thank you! You're very welcome Yulin :)
Been looking for this for years!!!
I'm glad you found it :)
I always enjoy your tutorials, straight forward and easy to follow. You are the one experts want to learn from. Thumps up!
I really love your way of explanation and examples😍
Thank you so much for your help on this topic and the many others you have shared. I will definitely be using this code in an upcoming project. One thing that I would add is a message box to alert the user if they have not chosen a sheet and then hit the Preview button. When one runs the macro an error message pops up. I added the following and it did the trick. Thanks
If c > 0 Then
Sheets(SheetArray()).PrintPreview
'If you'd like to print out
' Sheets(SheetArray()).PrintOut
Else
MsgBox "No Sheets have been selected"
End If
yes! i like this video, thank you sweet Leila and we always waiting for your next!
Thank you very much Leila! This tutorial is really helpful for me. Great job!!
I'm happy to hear that Victor :)
Hi Leila.. thanks.. great video and useful tip and tool to add to any workbook for easier previewing and printing. I can think of many parallel uses, such as a choice to save selected sheets to PDF or save selected sheets as a separate workbook, etc. Always a pleasure to view your videos and practice learning your techniques and implementing your ideas in my own work product. Thumbs up!
The PDF idea is also great! Thank you Wayne - also for your comment on the previous video which inspired me to make this one :)
Thanks Leila.. glad to be part of the process. I built your code into a workbook with some hidden sheets and realized the need to trap for that and not load them to the list box, otherwise the PrintPreview or PrintOut routine fails, if a hidden sheet is selected for processing from the list. I added this code.. problem solved.
For Each ws In Worksheets
If ws.Visible = xlSheetVisible Then
Me.ListBoxSh.AddItem ws.Name
End If
Next ws
Before following your channel and taking your VBA course, I wouldn't have known where to begin, let alone being able to solve the problem for myself. Thanks for all your help and inspiration. Looking forward to your next video. Thumbs up!
PS - Also added this code to trap for attempting to print with nothing selected in list box.. the fun never ends with VBA.. haha!!
If c = 0 Then
MsgBox "Nothing was selected.. try again!"
Else
Sheets(SheetArray()).PrintPreview
End If
Thanks for very useful videos...
Great programming! Thank-you.
Fantastic video, unbelievable Beautiful lady, thank you very mech 💕💕💕 , really , really fantastick .
Exactly what I needed!
Excellent as always....Thanks Leila
Thank you Leila, great video, Viele Liebe Grüsse
Danke Katerina :)
I need to know the vba basics to understand this tutor, this does look pretty useful too
Many tutorials are there but your guidance and presentation clears all doubts. Please give a detail of Redim Preserve meyhod
Thanks Leila. Great video as always, you have a prefect teaching voice and explain things extremely well. Well done.
Deep and clear explanation. Thank you Leila.
thank you so much Leila
That's very usefull .... thanks Liela
You're very welcome Hussein.
Private Sub Workbook_Open()
Sheets(2).Select
Sheets(1).Select
End Sub
works for me to refresh active listbox.
thanks a lot and more power!!
No words...God Bless u.
I love this concept. I am going to implement this at work. Amazing
That's great!
thank you, it worked great!
Your video saved me so much time. Thank you very much. Can you make the list skip some sheets that I don’t want in the listbox? And if so how?
Very Classy & useful...👌👍👍😚
I'm glad to hear that Ajay :)
hey this is fire 👍👍👍👍👍👍
Arrays start at 0.... love it....
As always great explanation
Excellent as always....Thanks Leila :)
Why do you not use integer for i?
By the way I got so much value from this video, I didn't know about the Locals window, Break, icons for macros, now I know byte is 0-254 and only takes up 1 byte instead of 2 for integers, I learned to populate listboxes and the difference between selections allowed, WOW. Thank you!
hi maam Leila Gharani, nice video tutorial... and please do a tutorial on how to create a bold function in excel, on how to bold a specific text in a string formula... thanks in advance.
Superb
Many thanks
Thank you Leila you are amazing!
Thank you very much Leila!
👍👍👌👌 Well-done
You are amazing you are safe me second time . Thank you.
You're welcome!
@@LeilaGharani
Dear Leila my be you can advise, after each opening and closing document , activexbox change size, become smoler and smoler . How to protect it ? Or lock . Thank you .
Thanks Mam... Nice tutorial
You're very welcome Sarfaraj.
Great video, can you do a video of how to print multiple data in a drop down list. Thanks a lot.
Very helpful video. How can I add another button which would print (or select) all sheets? Just as a shortcut if I would print them all more often. Without loosing preview function.
Awesome tutorial Leila ... lesson learnt ... thank you :-)
This is great! How would you filter that list in the list box based on certain cells on each sheet having data? (automatic instead of manual selection?)
As always, perfect, thanks to Leila ;)
Regarding your little "hack" at the end.
You could have made the code in a module and had sheet_activate run the module sub, then in workbook_open link to the same module sub. That way you don't force the user to a different sheet, and you can open the workbook on print sheet and it will be updated
Thank you for sharing - with VBA just like formulas you have so many ways of handling the same tasks. It's good to see the feedback from others.
Thanks sister
Hei. I am just facing one issue with this tutorial that is not matching mine. The cursor does not select the sheet inside the list box. Only when I go out of the listbox boundary and click something else outside, does the selection update. Why is that?
Hi Debayan, I'm currently having the same issue. Were you able to figure this out?
@@The_Doctor1224 It is workikg, you just have to work with better screen resolution. Are you working on multiple screens with different resolutions?
Great video, Teammate : )
Thank you Teammate Mike :)
thank you....
Wonderful tutorial!! I am still very new to this, is there a way to have your list box to show only certain tabs? Looking to not show my first two tabs but to show the rest. Thank you!
Greetings to you, Miss Truth. You have a wonderful and distinctive method of explanation and in a smooth language. I have Excel sheets for printing via Listbox, but after printing there is always a problem with the rest of the codes, so how can I send you the file. Sorry for the poor expression, it's just a translation
sempre com conteúdo relevante e bem interessante, aprendo muito com você.
I'm glad to hear that William.
This has been very helpful. I'm stumped on how to do this same thing, but automate print/saving to PDF. Specially using ExportAsFixedFormat. Any suggestions?
Thanks a lot
Hello, Thanks for the good work. What is the VBA code that i would use if i want to print all school report forms using a single button.??
Thank you very much. What if i want to show only few sheets in the list box and not all ?
Nice
Sweet! Need to get crackin on your vba course.
Hello. Instead of PrintOut, how would you go about saving as a .pdf? Thank you.
HI Leila Gharani... I really appreciate on your effort to make this video. It's teach me a lot of new thing to do in excel. Really thanks for it. HErewith I have a query that I would like to get your assitant on it... I would like to create in excel sheet the population of my neighborhood by create the command box or tex box the number of house. When ever we click the textbox or command box with the number of house, the detail of the owner of the house can be display either in print preview or in tabulation. CAn you assist me on it. I have to solve it, but unable to get it... appreciate your assitant on it. Thank you...
Hi Leila! I want to do this, but for several specific print areas within the same sheet. I can’t figure out how to do this. I created defined names for the different print areas and put them in an activex list box, but i’m not sure how to write the VBA code for it or what to do next.
Você é muito inteligente! Ótima dica 👍👍👍
Too good...
Hi Leila, is it possible to use a multi select enabled list box to "insert" criteria for sumproduct ? ... ie I want to use sumproduct to do a sum based on OR criteria logic and point to the listbox selection ?
Great tutorial Leila! How can I get a question too you?
good idea
Hi Leila, thanks for sharing the knowledge and helping others. I used this type of code to make a child activity record where teachers can enter the child activity per session. All is inputted from a central sheet which I would like to keep visible but not listed with in the list box is that possible please.
Hi Leila. I must say that you're my heroine 😁. I applied step by step the way to print many workseets at the sametime but I have an issue. Do hou have a webside where I could expose my problem?
Thanks,
François
Montréal, Quebec(Canada)
It would probably be best if you would post it on Microsoft's Tech Community Platform for Excel: techcommunity.microsoft.com/t5/excel/bd-p/ExcelGeneral
Great tutorial!
I did it and it worked while testing. However now it does not work properly for a "random"selection. Keeps saying "error 1004". Any ideas of what I'm doing wrong?
Hi Leila, I have been following your channel for a while now and I would really appreciate if you could help me with printing in landscape as well as portrait within the same worksheet. I could print one-one page but it would take a lot of time especially if I have to print the same document again and again. So how will you approach this problem? I would love to hear your thoughts. Thanks.
This Tutorial was Impressive and I am in Learning stage. I wonder Is it possible to print in single page, different sections of same sheet. for example: In sheet1 I want to print cells A1: B5 and C10:F20 . Just in my mind. Thank you.
did you find a way how to do this? maybe some help @leila gharani
Thanks a lot for your amazing way in explanation these topics.
I have a list with some items that are dynamically connected to the sheet it’s located on and want to print that sheet for each item in the list, is it possible to do that using macro?
thanks...
Leila your videos are excellent and the way you softly and slowly speak is absolutely amazing for viwers around the Globe.
I have an excel with data of more than 100 teacher.. Now I want to print separate page for each teacher and hand it over to them.. One way is to filter teacher and print which would take to filter 100 times.. Is there a way or trick i command to print teacher wise data with few click
dear LeilaGharani, is it possible to do that in listbox userform? cause the video is in listbox worksheet
Perfect Explained !! Can we print multiple sheets on a single page by vba coding ?
Thanks Ashok - Do you mean printing different ranges from the sheets? If yes, you can specify the print range for each sheet...
@@LeilaGharani want to print sheets("Sheet1").Range("A1:C50"), sheets("Sheet2").Range("A1:C50") fit on onesided A4 paper.
@@LeilaGharani is there any way you can help me out how to do this? I am trying this for already over 2 weeks and cant find a way :/
So I want to select multiple sheets and also print range in those selected sheets..thank you in advance!
Thank you 🌼🌼⚘
Ok I'll check
Please, how do you extract down into consecutive rows using a list box multiple selection with checkboxes and vice versa.
Hi
Instead of list box can I use sheet 2 and cell B2 to B10
to print the sheets with that names without selsctin them
How do I list only the visable sheet? I don't want my hidden sheet show up in the list.
Leila, I would like to embed an insurance rates calculator on my website so customers can can check their insurance quotes. How can I do that or can I use your services in the respect? Thanks.
Thank you very much for this trick and one more thing mam how to view vba code if Excel is locked by unviewable project shared workbook ...how to crack it ...looking for your reply
Thank you Leila for this video.
I wonder, would it be possible to create the same list but filled not with sheet names but with print area names?
You're very welcome. You could define the sheets & print areas in a separate sheet and use these for the list box...
@@LeilaGharani wow thats just what I am looking for. Would be awesome to know how to do this. Any chance you make a tutorial about it? :) :)
Regarding printing: I got a table that fits in a single page when printed. The table has titles in the top row. When choosing a value from the top left filter in the top row of the table, the dependent array below the filter gets filtered accordingly, and so the whole table now has less rows than when it's unfiltered.
What's the VBA code to automatically select the first value from the filter, and automatically print on paper the filtered table; then select the second value from the filter, and automatically print on paper the filtered table; and so forth until you have finished printing on paper all available values from the filter? Thanks in advance.
Is it possible to print all (from drop down list) to a single pdf file ?
What if we only want the last some sheets to be visible in the listbox to avoid clutter and unnecessary sheet names?