🎓 Get access to the full Excel VBA course here: www.xelplus.com/course/excel-vba-excel-macros/
@DodemMahapat-h2x7 ай бұрын
hOW ABOUT MAKING IT searchable assuming you have 100's or even thousands of sheets
@gabriellecajurao73914 жыл бұрын
Hi Leila i need your help. I am applying what you taught on multiple worksheets. I have a hundred of worksheet. Is there a way to have a search function with that combobox?
@ashutoshbagde32763 жыл бұрын
Nice Video. but still there is a big problem. U coded If Sheet = ActiveX then goto Sheet2 'to disable event goto ActiveX 'to enable event endif Now Suppose user deletes the tab Sheet2 and saves the excel. Then on reopening code wont find Sheet2 and this auto loading wont work. So there should not be event hard coded "goto Sheet2".
@hoffy113945 жыл бұрын
Does anyone know how to only show a subset of the sheets? I have hidden sheets that I don’t want visible to the end user.
@jimbarton70726 жыл бұрын
Extremely helpful as are all your videos. I made one small addition. Because I often use a hidden "settings" sheet, I added this to cbSheet.AddItem: If Sh.Visible Then Me.cbSheet.AddItem Sh.Name End If
@LeilaGharani6 жыл бұрын
That's a good one! Thanks for sharing.
@NikBFeld5 жыл бұрын
Hi, where would you enter that code?
@IrvanNoorHasim4 жыл бұрын
help... what about certain sheets?
@IrvanNoorHasim4 жыл бұрын
"spesific"
@valmirberisha52323 жыл бұрын
this does not explain where to place it. please elaborate.
@danielcousins88723 жыл бұрын
Your tutorials are not clearly explained
@Darioq57 Жыл бұрын
Hi Leila! Why isn't the code working for me? It will not populate the box. CBsheets is what I named the Combobx. Private Sub Worksheet_Activate() Dim Sh As Worksheet For Each Sh In ThisWorkbook.Worksheets Me.BCsheets.AddItem Sh.Item Next Sh.
@SpiritualMotto3 жыл бұрын
Bro, i developed a VBA where it will be used globally so many regional PC language there, but i want extract current month using following, FORMAT(Now, "MMM") it returns in my PC as FEB but if PC has Bulgarian language, it is showing as Febr as month using the same function. Is there anyway to get the month in english irrespective of any PC language.
@kadermeeran88162 жыл бұрын
Thank you Leila.. Your Videos are very helpful and your presentation is amazing very calm and composed... I would like to know "Excel ActiveX Combo Box to Select Worksheets with VBA" same code how can we print in PDF selected sheet with sheet name as file name . I added the code but showing error Sheets(SheetArray()).ExportAsFixedFormat Type:=xlTypePDF, Filename:= _ Sheets(i).Name, Quality:=xlQualityStandard, _ IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _ False awaiting your reply
@sudhirgulekar38184 жыл бұрын
Hi, Liela Gharani Can we do a VBA code to go to a specified sheet? Sub GotoSheet () Dim xRet As Variant Dim xSht As Worksheet xRet = Application.InputBox("Go to this sheet"," ") On Error Resume Next If xRet = False Then Exit Sub On Error GoTo 0 On Error Resume Next If xSht Is Nothing Then Set xSht = Sheets(Val(xRet)) If xSht Is Nothing Then MsgBox "This Sheet does not exist", , " " Else xSht.Activate End if End Sub I Tried this....isnt working
@mikelennon10783 жыл бұрын
The Format Control is there with 4 options. (Size, Protection, Propertied and Alt Text) there isn't a 5th option " Control" . I have checked two different computer with Excel 2019 and 365. Non shows the Control tab???? Your thoughts please.
@fotogenius78022 жыл бұрын
Hi Leila ; thanks for sharing your knowledge . Your videos are always awesome .....i am a Mac user ; beginner in VBA and fan of it . However the ActiveX controls are not activated?? on my Mac!!!! Grateful if you could assist me . Thanks beforehand for your assistance .
@nekomamoshi6722 жыл бұрын
Hey! thank you for the wonderful tutorials. Say I used the vlookup formula to create a class card all are working fines, thanks to the tutorial of yours. Now, my problem is I want to print it all once as one print job instead of selecting a name from drop-down list then pressing print because it can be annoying and time-consuming. Is there a way to do it? perhaps using VBA? thanks a lot.
@truebitsapplications78064 жыл бұрын
Excellent
@ATPRO925 жыл бұрын
There is a tiny problem, example: I have 100 sheets, if I click sheet no# 99 So i can go easily at 99, how can I come back from sheet99 to search sheet . Cloud please.....
@jomelsanpedro72713 жыл бұрын
MOUSE SCROLL WHEEL ActiveX COMBOBOX not working. please help thanks
@Scotts_Outdoor_Channel Жыл бұрын
Hi I love your work here. I was wondering if you could send me the code to deal with the error when I pick a hidden sheet in my combo box?
@wasimchhipa57083 жыл бұрын
I have combo box which uses list fill range & on click of value in combobox userforms open, but after closing when I click the value selected it does'nt open the userform again.
@fadhelzammouri49553 жыл бұрын
Leila, I want to keep the VeryHiden Sheets from appearing in the drop down list, how would I go about doing that? your hep is much obliged! Fadhel
@michaeldiamond27266 жыл бұрын
Hi Leila, Nice! I think it would be cool if you added some code that sorted the sheets in the combo box alphabetically. Could you create some sort of event that would automatically bring up the combo box (maybe add userform with a double click event - like I have in my custom formatting file)? I know this is only an example to show what VBA could do but I think it would be a cool tool to be able to add to my VBA toolbox at work (when I start working again). Maybe you could add this new code to the comment section (so you won't have to create another video). Really cool
@LeilaGharani6 жыл бұрын
Hi Michael, sorting is a good idea - you can use an array for that like in this link: exceloffthegrid.com/sorting-an-array-alphabetically-with-vba/ We could create this on a userform too and maybe have a shortcut key that brings it up. This way the users aren't going to unintentionally bring up the userform when they double-click or right-mouse click etc... this could also be added to the QAT. It's a good idea actually....
@michaeldiamond27266 жыл бұрын
HI Leila, Thank you for the link to that code. I'lll add this to my userform that I have in my custom formatting sheet. I imagine you could call the function into the existing code, correct? Great idea about the QAT, I am afraid to use a mouse event because you might not want to call the userform but still perform the same action with the mouse.
@michaeldiamond27266 жыл бұрын
I was able to get some additional code from the Mr Excel Message Board. Just search a search on Sorting sheets in a list box
@mehdihammadi61456 жыл бұрын
Thank you for sharing Leila. . Maybe you do that intentionnally but I would combine the procedures (write the code) in a way that avoid the switch to another sheet and coming back to run the macro if the workbook open on the ActivateX Sheet.
@LeilaGharani6 жыл бұрын
You're welcome Mehdi - do you mean having the procedures on the same ActiveX sheet instead of the workbook sheet?
@mehdihammadi61456 жыл бұрын
I would write the code that manage the updating of the ActiveX control in a module than just call it on the two event Worksheet_Activate and Workbook_Open
@TheHellis5 жыл бұрын
@@mehdihammadi6145 exactly my thought too. Hardcoding a sheet switch to "data" and then back means "data" must exist. What if we rename it to "data [year]" then the code fails. Duplicating the code works too, but that is WET coding, and it means you need to change the code at two places if you want to change something.
@mehdihammadi61455 жыл бұрын
@@TheHellis best practice when code invoke a sheet is to use its "VBA Name" not the "Sheet tab name"
@udihen4135 Жыл бұрын
hi, i have learned a lot from this lesson. how can i make a specific list and not a dynamic list? for exp-only 2 sheets from 5 sheets , that in the workbook?
@vegaswould Жыл бұрын
really awesome video. but if you right click on the sheet navigation arrows on the bottom left of the window, you get a pop up list of all the sheets in the workbook that essentially does the same thing.
@wpaz762 жыл бұрын
How do use radio buttons for activeX control and record the output into another tab - options are Yes And No - what VBA code would you write for this please?
@8m4059 ай бұрын
Possible to use an activeX DLL in excel 2016 vba?
@yoishitanujaya76424 жыл бұрын
Sorry lelila I'm talking about your video Activex combo box with vba
@jesusmyhope5544 жыл бұрын
How to set lable or any command button back style to transparent. After click on design mode or running userform it came to its original back style
@mdhashmath93533 жыл бұрын
Madam make a video on to select range for data entry in userform based on combo box range value.....
@gregsdoodles45472 жыл бұрын
THANK YOUUUU! I don't need the combo box, but I've been trying to figure out how to make sure my file opens to my dashboard every time it's opened and I think that last segment answers that. Now I'm kicking myself for leaving my laptop in my office so I have to wait until tomorrow to try it.
@LeilaGharani2 жыл бұрын
Hope it helps.
@MrElleoluis3 жыл бұрын
How to show only the sheets that i want in the combo box? Only 5 sheets in 30 for example
@abdultraders4 жыл бұрын
the question might be a bit out of context. but i am searching answer since a month surfing internet. Is there any VBA code which help us to automatically drop down list when we start typing in a cell that contain data validation. using Mac version so no ActiveX. thanks.
@Eazynl4 жыл бұрын
Is it possible to make this drop-down also searchable?
@Habib-fz3zq4 жыл бұрын
Amazing videos. I am using your version here. I am also trying to create a version where all worsheets are hidden (but ActiveX) and where only the selected combo-box option is unhidden with a button in each worksheet to take me back to ActiveX worksheet. I hope this makes sense :) If you have a tutoral video to help with this... Thank you again.
@danielemerli97815 жыл бұрын
I already knew this method, but your videos are so well done that I watch them even if (sometimes) they're nothing new for me. I think your explanations are very clear and useful also for Excel beginners.
@LeilaGharani5 жыл бұрын
Thanks for the kind feedback Daniele!
@glydllnn2 жыл бұрын
how to create an active combo box list from a fix list of sheet to open?
@markanthonyramos1446 жыл бұрын
Your post ws very helpful. Thank you so much leila.
@LeilaGharani6 жыл бұрын
I'm glad to hear that Mark. You're very welcome :)
@Suryaprakash-uy8ng4 жыл бұрын
I have the exact requirement and looking for solutions on various websites. Nothing helped except this one. Thank you so much
@Amerona5 жыл бұрын
What about changing name of the sheet ActiveX :-( Why not run same Code as in Worksheet_Activate() also At start up?
@domuhutagaol29585 жыл бұрын
Dear Ms Leila, How are you and hopefully you are well. I am working with VBA macro where I am creating user form of combobox to list some of sheets on my workbook into combobox ( sorry not all). let say I have 6 sheets which are Sheet1, sheet2, sheet3, sheet4, sheet5, sheet6. I wanted sheet2, sheet5 and sheet6 go into combobox. Could you please advise me the vba code on this. appreciate your comments. FYI I am using the below vba code but all of the sheet went into the combobox but I want only few sheets. below was the vba code : Private Sub userform_initialize() Dim n As Integer Do n = n + 1 CmbReporting.AddItem sheets(n).Name Loop Until n = Worksheets.Count end sub I change the name of combobox become cmbReporting.
@HiteshPatel-hq4lt3 жыл бұрын
Hi Leila. Thank you for all your VBA Videos. I have been using many of your VBA Codes quite a while now. Recently I have used your code of this video and achieved what I was willing to. However, as an additional feature, I wrote code to first unhide the sheet based on ActiveX selection but failed to re-hide the same sheet again when ActiveX sheet is reselected after relevant data entry. Below is my attempted code: Private Sub cbSheet_Change() If CBSheet.Value "Select a sheet" Then Worksheets(CBSheet.Value).Visible = True Worksheets(CBSheet.Value).Select If Worksheets("ActiveX").Select = True Then Worksheets(CBSheet.Value).Visible = False End If End If CBSheet.Value = "Select a sheet" End Sub
@mohammedMbwana6 жыл бұрын
78 viewer and 1st comment. Great video Leila
@LeilaGharani6 жыл бұрын
Thanks for the quick watch & comment!
@valmirberisha52323 жыл бұрын
Hi, how to do make this possible if you want to hide sheets?
@gwhittaker3 жыл бұрын
Hi Leila, I love your work and have been silently following for years now. I don't know if you actually answer questions here or not, but here goes. I've been using your sheets navigation list form this video and have come across the need for it to be alphabetized. Can you point me in the right direction? Thanks for any help.
@TradShowTom Жыл бұрын
Very nice. Thank you, Leila. The only issue I had was if I added the code to put "Select Sheet" in it crashed every time. It would go to the sheet but then give me an out-of-range error. I checked my code 5-6 times and, near as I could tell, it was right. I'm sure it's something I'm doing wrong on my end though. Your tutorials are great! Not 2 hours long so easy to stop and start and get it going.
@omar-sq6zq4 жыл бұрын
ماشاء الله عليك
@frankk18183 жыл бұрын
Hi Leila, i’m always suprized to see how easy and understandable you make excel. Leila how can i make this combobox work if I “hide” worksheets. With the current vba formule it give a error (de bug”? Thanks frank
@leeeric62923 жыл бұрын
Hi, Thanks very much for your KZbin. Instead of using change event, I have tried the "click" event also, and also work. Could you tell me their differences ? Under what circumstances they will get different results? Thanks.
@errolwirasinghe5 жыл бұрын
Leila, I am not into excel in a big way; but follow your lessons. where can we get the code for the active box?
@joemarvisda95414 жыл бұрын
Hi. Very helpfull tutotial... im wondering is it possible that the drop.down details in the combo box will be arrange alphabetically? Thanks
@alibourkaib30034 жыл бұрын
How to define a line using combox ?!
@grzegorzrzoska43442 жыл бұрын
How can I achieve this in the user form?
@karuppusamyn5155 жыл бұрын
Thank. How to transfer data to specific sheet same method in userform combobox ? i have fixed the sheet name like data (wrote in the algorithm). now I need change instead of data to combobox value. I hope you. Help me..🤔🤔
@pjy10065 жыл бұрын
Hi Leila, The video is great! I did the exact same one yesterday and the combo box was populated successfully. Today I played with the code a little bit in VBA editor. But later in the day, I tried to open a new excel file and used the exactly the same code by following every step here. However, this time, my combo box just wouldn't populate anything. I tried 3 times this evening but still failed. Any clue?
@dianseno76833 жыл бұрын
I form indonesia Good your jobs tanks u
@younisrafiq41615 жыл бұрын
Hi Leila.. what if we have to select multiple sheets without referring name or index. number As an example I want to print multiple sheets, how can I select them to get printed at once. Thank you
@caseyjohnston333211 ай бұрын
I didn't even realize that I wanted this, but now I must have it! Great presentation! The workbook seems to be missing though.
@PFunk-kt9gc10 ай бұрын
I could not find the workbook
@roberttimmerman89075 жыл бұрын
I tried the excercice "Excel activeX Combo Box to select Worksheets with VBA" and at the end you make changes in the workbook. In my excercise there is no workbook present.
@forrestgump21145 жыл бұрын
Why not populating the combo box at the workbook open event, it’s the same code when activating the sheet just copy/paste instead of running two codes !!
@daljeetdhillon45883 жыл бұрын
Thank you so much Leila for this Video, Please help me with query "how to exclude excel tabs name from combo Box"
@bhavanishtrivedi4584 жыл бұрын
Hi Leila - Any guidance you can provide on how I can wrap text in a combobox and make OptionButton (grouped) mandatory?
@jesusmyhope5544 жыл бұрын
hello madam, is there any chance that we can make a dropdown list in combobox of available userforms in same excel and open them by selecting combobox value. looking for your answer.
@yoishitanujaya76424 жыл бұрын
Hi leila I have a question, what if we hide the selected sheets Is it still appears in combo box Thanks anyway God bless you 👍👍👍
@mantasmontvila10074 жыл бұрын
How can I make my hidden sheets appear in the ComboBox? Since right now it gives me an error. Thank you!
@kaaa34855 жыл бұрын
Hi Leila, If you we are analyzing 2 factors like time and temperature, we use a graph to see the effect of time on the temperature. But how can we analyse the data based on 3 or more factors to see their effect. Thanks in advance.
@gregt77255 жыл бұрын
Hi, What to do when user form seems to be doubled? Is it some kind of error in my excel? Once form has been created every click on it creates second one that actually is operative.
@ferdinis4 жыл бұрын
Hi Leila. Thank you for your video. Very well made. I have a question regarding this topic. If we want to sort the worksheets inside the combo box. How can we do it? Your reply is much appreciated.
@giovannidimaio19772 жыл бұрын
Hello Leila. I love what you do, it is really useful and helpful. You were born to be a teacher. This video really helped me with my work especially when I have a Workbook full of sheets. Is there a way that we can make the combobox searchable digiting some letters? Thank you
@azizuke5 жыл бұрын
plz leila; can you synchronize the combo box with excel drop down list !?
@sanneng88562 жыл бұрын
I really love your video. You explained clearly.
@vargheseaugustin77334 жыл бұрын
leila can we select multiple sheets from this combo box by pressing ctrl and activate multile sheets, if not what changes we have to make
@NetherVoiD5 жыл бұрын
The bad thing about combo box is that you cant stick it insidethe cell like data validation. You have to program like an engineer just to make combo box do that
@maisarahmustafa39276 жыл бұрын
Hi Leila :) What if I only want certain sheet in the combo box? What should I do?
@vasudevan76375 жыл бұрын
Hi Leila I need one clarification in excel conditional formatting (How to turn conditional formatting cell color into fill color in another cell) Please let me know once you found the solution Thanks
@johnjohnjman5 жыл бұрын
What if I want the Combo Box to select a few specific sheets? (i.e. not all the sheets in the workbook but just the ones I want)
@Galileo2pi3 жыл бұрын
This is very useful; It' is what I was looking for. You're great Leila, thanks
@mohamed.montaser6 жыл бұрын
how to contact you, i have a sample data that i want to show you and i have a question about it, how to lookup 2nd or 3rd value with multiple criteria with index and match
@positive73935 жыл бұрын
Great tutorial. How to list and select worksheets that contain specific letters or word with Combo Box? IS it possible? Thank you
@DarcyWhyte5 жыл бұрын
Nice! Have you thought of adding a function into a module that populates the dropdown? Then it can be reused from the workbook load and the sheet activate. You just pass "me" from the activate as a parameter to get the context. From the open pass a reference to sheet(1).
@faisalalrubai3 жыл бұрын
Thank you much.
@zahirshah41174 жыл бұрын
i love you sweet
@raymarreyes22084 жыл бұрын
How about in Google Spreadsheet? please help me :)
@taizoondean6893 жыл бұрын
Thanks 👍
@jamesjujare25996 жыл бұрын
Wow.. Awesome.. Really much useful class.. Waiting more videos .. Leila 😊
@ATPRO925 жыл бұрын
If there any video related about this problem please send the link
@hosseinhosseinpoor48453 жыл бұрын
thanks.
@yemisiadeoluwa79073 жыл бұрын
You are the best Leila thanks so much for all your videos
@xaquison Жыл бұрын
Very useful and easy to create. Thanks.
@errolwirasinghe5 жыл бұрын
Sorry.. I was able to download it - thanks! You are an expert; but more.. an excellent teacher!!
@LeilaGharani5 жыл бұрын
Great. Thanks for the kind words Errol!
@rajaelrajon5 жыл бұрын
Thanks Leila, I'm learning very much with your Videos. Since I found your channel I visit it every day. I have an observation, since the the ComboBox is dynamic, what if the user delete the worksheet "Data" that is used at the open event. It´s better to use something like this ... Private Sub Workbook_Open() Dim SH As Worksheet temp = "" For Each SH In ThisWorkbook.Worksheets If SH.Name "ActiveX" Then temp = SH.Name If temp "" Then GoTo salir Next SH salir: If ActiveSheet.Name = "ActiveX" Then Worksheets(temp).Activate Worksheets("ActiveX").Activate End If End Sub
@LeilaGharani5 жыл бұрын
Agree - that's a good workaround. Many thanks for your contribution.
@mchandan765 жыл бұрын
thank you for this usefull function , is it possible to open the list box ( Active X ) sheet every time we open the workbook.
@wayneedmondson10656 жыл бұрын
Hi Leila.. another excellent and useful video.. very professionally presented and easy to follow. I watched and copied your steps through the video and then to reinforce the lesson, I built the same from scratch without the video. Both worked without a hitch. This could be easily adapted to printing vs. selecting, sending the selected sheet name from the Combo Box to a Worksheets(cbSheet.Value).PrintPreview or Worksheets(cbSheet.Value).PrintOut command instead of Worksheets(cbSheet.Value).Select command. That would be a time saver. On that thought.. what about a video lesson on using the List Box ActiveX control to enhance a Print Preview or Print Out procedure for selecting multiple sheets for processing simultaneously? I can envision multi-selecting from a List Box to do Print Previews of groups of sheets or sending selected sheets directly to the printer simultaneously as a single print job. That would be helpful.. something to consider if you are looking for a new topic for your next video. Thanks again and Thumbs up!
@LeilaGharani6 жыл бұрын
Thank you Wayne for your comment! I love your idea on ListBox that enables print preview or directly printing selecting sheets. I've added that to my list. Thank you!
@taco7rk346 жыл бұрын
Always great videos Leila. I like when I get notifications that you have a new video. I run to my computer. From a practical standpoint, in what business scenario would this be a better option then just clicking the tab itself? Do you have any books that you recommend to learn VBA for Excel?
@LeilaGharani6 жыл бұрын
Thank you. I'm really glad to hear you enjoy the videos :) I'd say this is good for files that have a lot of tabs where you need to scroll to find the right tab, or for customized applications, where you hide the tabs from view and get the user to jump to different pages from the drop down only.... You can find the books I recommend here: www.xelplus.com/resources/#excel I love the one from Walkenbach.
@flaviogarlatticosta7 ай бұрын
Eccellente tutorial, complimenti.
@LeilaGharani7 ай бұрын
Grazie! 😊
@bassisessaidexcel4 жыл бұрын
Merci
@greggowaffles4 жыл бұрын
Love how you bring up problems that arise, so that the viewers can get a deeper understanding. Awesome video!!
@nguyenkhacquan14044 жыл бұрын
Thanks for showing us! It's an amazing feature.
@BigIz1045 жыл бұрын
Awesome! Thank you! I recorded macros for hiding my sheets that will only appear when selected from the combobox. Is there a way to have the combo box unhide the sheets then go to them?