Fully Dynamic List in Combobox of VBA

Поделиться
HTML-код
  • Опубликовано: 14 окт 2024
  • Hello Friends,
    In this video you will learn how to create a Fully Dynamic List in Combobox of VBA.
    Please download this excel file from below given link:
    drive.google.c...
    Watch the best info-graphics and dynamic charts from below link:
    • Dynamic Graphs
    Learn Step by Step VBA:
    • VBA Tutorial
    Facebook:
    / pkan-excel-expert-9748...
    Telegram:
    t.me/joinchat/...
    blogger:
    pk-anexcelexper...
    Twitter:
    / priyendra_kumar
    Send me your queries on telegram:
    @PKanExcelExpert

Комментарии • 138

  • @arkd3um1988
    @arkd3um1988 2 года назад +1

    much respect for your effort to explain this example. Thank you. It is exaclty what i needed.
    Regards from Romania

  • @hansasare4078
    @hansasare4078 2 года назад +1

    Awesome videos...Your VBA tutorial videos is one of the best I have seen so far...well done and God bless you Sir

  • @BINAYKUMAR-kn2ye
    @BINAYKUMAR-kn2ye 4 года назад

    Dear Sir, First I thankful to you for send Inventory Managment for practice , in that practice I serch verious Utube channel for serching dependent combobox but I spent 5 hours but not good for me then in meanwhile I look Fully Dynamic List in Combobox of VBA that I am surprise in few code I have done my problem with many facilities, for this I am highly oblize . thanks again.

  • @معلمسالم-ك2ج
    @معلمسالم-ك2ج 3 года назад +1

    I am an Arab and this video helped me a lot .. Thank you

  • @M4rt1nX
    @M4rt1nX 4 года назад +3

    Finally I found a video with instructions that really works.

  • @mathsever34
    @mathsever34 6 месяцев назад

    Perfect! Is it possible to have a combobox as category 1, category 2, category 3?

  • @anmarhakami
    @anmarhakami 2 года назад +2

    You are good 👍🏻 thanks 🙏

  • @RaviMishra-hh8dx
    @RaviMishra-hh8dx 10 месяцев назад

    Thank you very much sir for this relevant video to my work can you plz teach us how to view data from excel sheet according to 3 or 4 combobox filter.

  • @marcioaffonso0
    @marcioaffonso0 2 года назад +1

    Thank you, Very informative

  • @choudhary8150
    @choudhary8150 4 года назад +1

    Thanks . This is the video what I exactly want.... really it's very helpful

  • @sunilchapra1044
    @sunilchapra1044 3 года назад +1

    Thanks for good video

  • @slimaneboudour8240
    @slimaneboudour8240 2 года назад

    Thank you for this video.

  • @tariqul199
    @tariqul199 3 года назад +1

    Sir, really you are great!

  • @ardeshiraqayi9976
    @ardeshiraqayi9976 3 года назад

    Sooooooo useful... Tanks a lot brother ...

  • @jintamolp.y.2230
    @jintamolp.y.2230 3 года назад

    Whether we can do it if multiple sheets are present

  • @Fazwaans
    @Fazwaans 3 года назад

    Thanks for sharing your knowledge with everyone, Can you kindly enplane make video how to add Columns manually, e.g if i just want to add Column D, g, or Z. thank you

  • @muhammadakif5951
    @muhammadakif5951 3 года назад

    Sir if I write the first letter of any month or year will the drop-down list show only those items that start with the letter I have entered?

  • @Kutesac
    @Kutesac 4 года назад +1

    Great instructions...very understandable.

  • @paulocezardesouzasouza2044
    @paulocezardesouzasouza2044 4 года назад +1

    Another excellent class. Thank you.

  • @alikilali2249
    @alikilali2249 4 года назад

    Thank you man for this video

  • @TimHulse
    @TimHulse 3 года назад +1

    Nice work!

  • @alhassanmusah7242
    @alhassanmusah7242 3 года назад +1

    great work thanks

  • @Ponder_The_Cosmos
    @Ponder_The_Cosmos 4 года назад +2

    Thanks so much for this tutorial. It worked almost perfectly for me, but in my second combobox, the last rows value for selected column does not show. Does anyone know how to fix this?

  • @Yorumcu63
    @Yorumcu63 2 года назад

    Nice Video

  • @Aryan.Vivhaan0111
    @Aryan.Vivhaan0111 6 лет назад +1

    This video is very useful but when I m using this in my existing user form its showing unable to get the match property of the worksheet function class. Independent data is showing in combobox but when I using submit button this time the error is coming .can u suggest me for the solution.

  • @henokayele8497
    @henokayele8497 4 года назад

    wow your teaching is best! but i need some help of you
    how to code in vba not i worksheet this code please tell me you captured on worksheet but i want to code in vba.............eg:- combobox1 ("subject").........Dynamicaly in combobox2 = Biology.....physics.....etc

  • @dashyi97
    @dashyi97 6 лет назад +1

    Thank you for the very useful tutorial sir. May I ask how can I add a Clear button to the userform for the dynamic list in combobox? I seem to have an error with the Match property of the worksheet function when I use my usual code for Clear button. Thank you sir

  • @barisersoy9784
    @barisersoy9784 5 лет назад +1

    Thank You!

  • @MohAboAbdo
    @MohAboAbdo 4 года назад +1

    Thanks... Thanks... Thanks.

  • @ardeshiraqayi9976
    @ardeshiraqayi9976 3 года назад

    Please help me on this:
    What about the ComboBox on the worksheet?
    How can I simply make a dynamic range and then populate the ComboBox with it?
    Without a For Loop , of course

  • @alializadeh8195
    @alializadeh8195 2 года назад +1

    Thanx

  • @LearningWhileHavingFun
    @LearningWhileHavingFun 4 года назад

    Hi An Excel Expert, i learned a lot and i am following your tutorials, just curious whats the formula because at 9:50 the video got blurry hope you can help me or any one can help me with this. ty

  • @TheNewLifeTech
    @TheNewLifeTech 4 года назад

    Thank you so much for this wonderful video, can I apply this my another userform, please guide me.

  • @abdallahbelcaid3002
    @abdallahbelcaid3002 4 года назад +1

    Thank you so much ! and what about dynamic login form ?

    • @PKAnExcelExpert
      @PKAnExcelExpert  4 года назад

      Thanks for watching. Please watch below given video for login form:
      ruclips.net/video/n7I5-6fj1kY/видео.html

    • @abdallahbelcaid3002
      @abdallahbelcaid3002 4 года назад

      @@PKAnExcelExpert thank you sir

    • @abdallahbelcaid3002
      @abdallahbelcaid3002 4 года назад

      @@PKAnExcelExpert Sir I got an error in the function match what is the solution please help me is my final project ?

  • @AamirSaeedTajalli
    @AamirSaeedTajalli 5 лет назад

    hello, wornderful tutorial.. Love your command over Excel and VBA.
    I have one question. What, if i want to display the first item of the 2nd category list depending on the the main category chosen above? kindly explain.

  • @sameer_ansari5434
    @sameer_ansari5434 5 лет назад

    Excellent work @PK: An Excel Expert, i want to extract data based on dependent drop down. i have prepared simmillar dash board using simple slicer, but i want to make a user form and extract data while i am gradually applying the filters with dependent dropdown. please help me with some guidance. an explaination would be more than i could ask. NIce work sir.

  • @Design360
    @Design360 3 года назад

    *_Dear Sir, I am Md. Alamgir Kabir from Bangladesh. Thank you so much for your valuable tutorial. It's the same as my requirements, but I have a small query, How to add a unique item to this Combobox. Please help me_*

  • @ktamilarasan17
    @ktamilarasan17 4 года назад +1

    Thanks a lot!!!!!

  • @fanueltomas2269
    @fanueltomas2269 5 лет назад

    Very nice

  • @bharatprasad8450
    @bharatprasad8450 4 года назад +1

    Good lesson to me, Thank a lot

  • @crimcrow
    @crimcrow 6 лет назад +2

    Thanks, Really helpfull :)

  • @abdallahbelcaid3002
    @abdallahbelcaid3002 4 года назад +1

    Please answer me I got an error 1004
    c=application.worksheetfunction,match(me.combobx1.value,sh.range("1:1"),0)
    geta an error saying that "unable to get the match property of the worksheet function class"

    • @tmatthew5373
      @tmatthew5373 3 года назад

      take out the ".worksheetfunction."; just using "application.Match". This changes the error type from 1004 to 13.
      Error 13 is a type mismatch. This happens because you declared variables as integers, but when the values are assigned/used, they may be Text. (Dim i As Integer. This later can change to a text in 'Me.ComboBox2.AddItem')
      As a work-around, add a 'On Error Resume Next' in the second part of the code
      Dim sh As Worksheet
      Set sh = ThisWorkbook.Sheets("Setup Table")
      Dim i As Integer
      Dim n As Integer
      On Error Resume Next
      n = Application.Match(Me.ComboBox1.Value, sh.Range("1:1"), 0)
      Me.ComboBox2.Clear
      For i = 2 To Application.CountA(sh.Cells(1, n).EntireColumn)
      Me.ComboBox2.AddItem sh.Cells(i, n).Value
      Next i

      End Sub

  • @pietrogazzera5733
    @pietrogazzera5733 6 лет назад +2

    Bravo!

  • @chesterjackson4690
    @chesterjackson4690 6 лет назад +2

    Great lesson. However, I continue to have a runtime error '1004'. The overall function works properly until I added in the code for clearing the fields. When I remove the code starting at 7:41 everything works great. I guess I will need to remove that existing combo box and add in a new one and resubmit the code. Overall....very helpful

    • @JGuitarJ24
      @JGuitarJ24 4 года назад +1

      Hi Chester, How did you fix this problem? I am facing this issue right now with the clear button and I do not know what to do. Thanks

    • @keyingong6728
      @keyingong6728 2 года назад

      Hi Chester, is the issue resolved? Do you mind to share the solution?

  • @gautamgarde344
    @gautamgarde344 4 года назад

    Hello sir
    Sir please upload a video that's also contains the add items to dependent dropdown list.

  • @marcosbertozzo3193
    @marcosbertozzo3193 5 лет назад +1

    Thanks a lot!

  • @sdesilva4728
    @sdesilva4728 5 лет назад

    Thank you, it helped a lot...

  • @Learner566
    @Learner566 4 года назад

    How to vaildation combobox value if when change the value by keypress

  • @michaelconnors9906
    @michaelconnors9906 6 лет назад

    My range is in a column, not in a row. It begins in E8. I added a declartion or RNG as Range, Set rng = Range(Range("E8"), Range("E8").End(xlDown))
    I kept Me.ComboBox1.Clear
    I rewrote the next line as
    For i = 8 To Application.WorksheetFunction.CountA(ActiveSheet.Rows(8))
    I changed the 1 to a 5 in this line of code.
    Me.ComboBox1.AddItem sh.Cells(i, 5).Value
    Here's the full code. I hope it helps you set the range if it is other than 1:1
    Private Sub UserForm_Activate()
    Dim sh As Worksheet, rng As Range
    Dim i As Integer
    Set sh = ThisWorkbook.Sheets("Sheet1")
    Set rng = Range(Range("E8"), Range("E8").End(xlDown))
    Me.ComboBox1.Clear
    For i = 8 To Application.WorksheetFunction.CountA(ActiveSheet.Rows(8))
    Me.ComboBox1.AddItem sh.Cells(i, 5).Value
    Next i
    End Sub

    • @bosmanpm
      @bosmanpm 5 лет назад

      Hi. I used your changed code to my case. My range is also in column but start in B7.
      I changed yu code to:
      Private Sub UserForm_Activate()
      Dim sh As Worksheet, rng As Range
      Dim i As Integer
      Set sh = ThisWorkbook.Sheets("Urlopy")
      Set rng = Range(Range("b7"), Range("b7").End(xlDown))
      Me.ComboBox1.Clear
      For i = 7 To Application.WorksheetFunction.CountA(ActiveSheet.Rows(7))
      Me.ComboBox1.AddItem sh.Cells(i, 2).Value
      Next i
      all is fine, but I have more than 30 rows. This code shows me only 30 firsts rows. Last ten aren't visibility! How solved it?
      Any ideas?
      Ps. You have declared : rng As Range -> Set rng = Range(Range("b7"), Range("b7").End(xlDown))
      Why? Where is it in solution?

  • @daljeetsingh1231
    @daljeetsingh1231 3 года назад

    I have 2 Dropdown List with the same options (Included and Excluded) in different sheets. If I select " Included" in one dropdown list, it should also select "Included" on another dropdown list and vice versa. I am new in coding please help me out to crack this.

  • @keranicat2127
    @keranicat2127 5 лет назад +1

    please help me "run time error 5" invalid procedure call or argument ***
    For i = 2 To Application.WorksheetFunction.CountA(sh.Cells("1,n").EntireColumn)

  • @surajbagkar9792
    @surajbagkar9792 5 лет назад +1

    nice one

  • @123DZDZ
    @123DZDZ 5 лет назад

    Hi PK, good job, but can you do the same and eliminate the duplicates , exp: if the month or the year is repeated twice or more, it won't be shown on the comboBox, Thanks

  • @clovissassine7947
    @clovissassine7947 6 лет назад

    Friend, can we have something similar to that about having a plan for a call center where employees can schedule their breaks and lunch and personal? or do you have a link for such a video?
    appreciate your assistance, thank you.

    • @PKAnExcelExpert
      @PKAnExcelExpert  6 лет назад

      Hi Clovis,
      I don't have such video ready as of now but I will definitely try to make such video very soon.
      Thanks for watching

    • @clovissassine7947
      @clovissassine7947 6 лет назад

      thank you very much, hope to get a notification once it is done, i believe its beneficial for a lot of people as well, keep it up, your doing a great job!!!

  • @upgradetechnicalskills3392
    @upgradetechnicalskills3392 6 лет назад

    Hi Good morning sir
    I have made one searchable drop down list.
    My question is if my data is X workbook and I want to create searchable drop down list in Y workbook. is it possible and how to do that?
    Can you help me on that

    • @PKAnExcelExpert
      @PKAnExcelExpert  6 лет назад

      Hi Kurban,
      I will try to make such video very soon.

  • @vidyatutorials113
    @vidyatutorials113 6 лет назад

    Sir please tell me best book for VBA for beginners

  • @kailashsoni676
    @kailashsoni676 Год назад

    Sir show row wise dynamically

  • @manyoeur
    @manyoeur 6 лет назад

    Dear Sir, how can we code if we have more sub categories?

  • @alriyami09
    @alriyami09 4 года назад +1

    hi, friend, can you help me to design the data entry form for me how much your charges

    • @engrmamun59
      @engrmamun59 4 года назад

      I can help you during payment contact. (You can mail me : engrmamun66@gmail.com) with your requirement.

  • @jamilurrahman4328
    @jamilurrahman4328 5 лет назад +1

    Thanks
    nice

  • @pankajhiralalpatel4454
    @pankajhiralalpatel4454 5 лет назад

    Sir
    I have an excel sheet, column A has dates and column B to J has other data. I want to create a combobox which shows those months which first date to end date available in Column A .
    Thanks in advance
    Please help me

    • @AamirSaeedTajalli
      @AamirSaeedTajalli 5 лет назад

      hi, did you get solution to this? can you plz explain what do you mean by "which shows those months which first date to end date available in Column A"

  • @VijayKumar-zd7ou
    @VijayKumar-zd7ou 5 лет назад

    Sir how to be same condition apply ActiveX control without userform how to be possible

  • @LearningWhileHavingFun
    @LearningWhileHavingFun 4 года назад +1

    hi thank you so much great video
    im having a run time error with this code
    n = Application.WorksheetFunction.Match(Me.txtSupervisor.Value, sh.Range("1:1"), 0)

  • @vigneshwarank529
    @vigneshwarank529 6 лет назад

    Well and good

  • @mrtechguru341
    @mrtechguru341 6 лет назад

    sir please tell me how to make Double dynamic list in Combobox with coding please sir reply kar na !

  • @mjcomputershimatnagar8524
    @mjcomputershimatnagar8524 4 года назад

    Sir I want edit form by name search box

  • @tors-a4808
    @tors-a4808 4 года назад

    Great tutorlia. However my c=application.worksheetfunction,match(me.combobx1.value,sh.range("1:1"),0)
    geta an error saying that "unable to get the match property of the worksheet function class"
    I don't understand as I have completly copied your code.

  • @abdihassen9102
    @abdihassen9102 6 лет назад

    Thank you for your replay, it was my mistake

  • @hasanthidevendra7049
    @hasanthidevendra7049 6 лет назад

    can yo give solution to show it on user form as list instead of showing it on excel sheet

  • @ModernPindawale
    @ModernPindawale 6 лет назад

    Sir excel main MISS expert person Kon hota hai. Or isme Kiya Kiya aata hai excel ka

  • @SongsForSoul_ID-tr3cs
    @SongsForSoul_ID-tr3cs 5 лет назад

    i use thi script,but when i input an error occur, can you help me?

  • @hemendravakharia2502
    @hemendravakharia2502 5 лет назад

    but after running the combo box how to enter data in excel sheet ???

    • @pablosel3857
      @pablosel3857 3 года назад

      You call a procedure that contains everything you want to do

  • @abdihassen9102
    @abdihassen9102 6 лет назад

    unable to get the mach property of the WorksheetFunction class, how can I solve that please

    • @acespere
      @acespere 6 лет назад

      how?? please.. anyone? followed above but encountered error.. help

    • @PKAnExcelExpert
      @PKAnExcelExpert  6 лет назад

      Hi,
      Please send me your excel file along with the error snapshot on info@pk-anexcelexpert.com.

    • @Akash_with_GSD
      @Akash_with_GSD 5 лет назад

      @@PKAnExcelExpert same problem

  • @vonandrewronquillo5708
    @vonandrewronquillo5708 6 лет назад

    What is abilabil?

  • @dursunn
    @dursunn 2 года назад

    how can I do this in python?

  • @VijayKumar-zd7ou
    @VijayKumar-zd7ou 5 лет назад

    Sir, can we will do this condition on sheet ActiveX control combo box on sheet without user form in excel please help and give me sample file on my email id

  • @VijayKumar-zd7ou
    @VijayKumar-zd7ou 5 лет назад

    Sir without combo box how to done

  • @mrtechguru341
    @mrtechguru341 6 лет назад

    Plz bro reply me

  • @redareda2872
    @redareda2872 5 лет назад

    you re the bt

  • @AamirSaeedTajalli
    @AamirSaeedTajalli 5 лет назад

    Seems, SIR dont like or dont get time to REPLY here :)

    • @PKAnExcelExpert
      @PKAnExcelExpert  5 лет назад +1

      Hi Amir, sorry for the late reply. You can use listindex property of combobox. It starts from 0.

    • @AamirSaeedTajalli
      @AamirSaeedTajalli 5 лет назад

      @@PKAnExcelExpert Thanks a lot dear. I tried it on form level but not working.

    • @AamirSaeedTajalli
      @AamirSaeedTajalli 5 лет назад

      Boss, just now tried again. In excel at form level, i used code "ComboBox17.Text = ComboBox17.ListIndex(0) and getting "Type mismatch error"
      Data is populated absolutely correct. Just want to select and display first item in list of combobox17

  • @MrPACO0508
    @MrPACO0508 6 лет назад +1

    Thank you for the very useful tutorial sir. May I ask how can I add a Clear button to the userform for the dynamic list in combobox? I seem to have an error with the Match property of the worksheet function when I use my usual code for Clear button. Thank you sir

  • @MohAboAbdo
    @MohAboAbdo 5 лет назад +1

    Thanks ... Thanks.

  • @MohAboAbdo
    @MohAboAbdo 5 лет назад

    Thanks ... Thanks ... Thanks ...