How to Create Excel VBA Data Entry Form With Search Function using Userform - Full Tutorial

Поділитися
Вставка
  • Опубліковано 8 лис 2024

КОМЕНТАРІ • 153

  • @ruffbean8570
    @ruffbean8570 Рік тому +1

    Another excellent tutorial. Easy to follow and easy to understand.

    • @DJOamen
      @DJOamen  Рік тому

      Glad it was helpful!

  • @jonarsklol3864
    @jonarsklol3864 2 роки тому

    Exactly what I am looking !!! Top +1 Thank you sir !!!

  • @kacondey4700
    @kacondey4700 Рік тому

    Thanks for the video.. it helps me a lot

    • @DJOamen
      @DJOamen  Рік тому

      It's my pleasure, c

  • @karunakardev980
    @karunakardev980 5 років тому

    I am following your videos............I found them very informative, and useful for excel user... Thank you sir for your efforts

  • @kelsideng6187
    @kelsideng6187 5 років тому +3

    Exactly what I am looking for, very good tutorial, thank you very much!

  • @me_032_aryanbral3
    @me_032_aryanbral3 3 роки тому +1

    Thank you sir! one of best tutorial for learning excel. One query I could not able to create the button(macro) of this form. May you please help me.

    • @DJOamen
      @DJOamen  3 роки тому +1

      Try again or search for how to create macro button on UA-cam

    • @me_032_aryanbral3
      @me_032_aryanbral3 3 роки тому

      @@DJOamen thankyou my problem is solved

    • @DJOamen
      @DJOamen  3 роки тому

      Well done 👍

  • @xtzewka4107
    @xtzewka4107 3 роки тому

    Daaamn, Cap your are the best, thank you very much for the tutorial

    • @DJOamen
      @DJOamen  3 роки тому +1

      My pleasure!

  • @akimernest
    @akimernest 5 років тому +4

    Great Tutorial Worked Perfectly Fine, Just One Question How Can I Make The Search Function Work For More Than One Criteria.

    • @DJOamen
      @DJOamen  4 роки тому

      Check out this video: How to Create Data Entry Form with Multiple Search function and Protection in Excel
      studio.ua-cam.com/users/videowMmsmolIX_k/edit

  • @NuclearNewsDub
    @NuclearNewsDub Рік тому

    Great video, helped me out a lot. Is there a way after search if a user updates the data in the form it can be saved over what is already there??

    • @DJOamen
      @DJOamen  Рік тому

      Yes

    • @NuclearNewsDub
      @NuclearNewsDub Рік тому

      @@DJOamen Thanks for the reply, would you have a tutorial anywhere (even if I have to pay for it) It's the last thing I need to finish of my form. Thanks in advance and Happy Christmas!

  • @mr.a_a9407
    @mr.a_a9407 4 роки тому

    Great for beginners to learn... kudos to you

    • @DJOamen
      @DJOamen  4 роки тому

      So nice of you

  • @joco.6162
    @joco.6162 2 роки тому

    Hi ! Thank you sir ;) You're the best +1

  • @CONTESTANT1
    @CONTESTANT1 2 роки тому

    Exactly what I'm looking for. Will this code work in Google Sheets Script do you think? Could you print it to a sheet I wonder? Thanks, great vid.

  • @mjunaediqbal
    @mjunaediqbal 5 років тому

    Good tutorial sir and it worked perfectly.

    • @DJOamen
      @DJOamen  5 років тому

      Well done 👍

  • @indianmonster1445
    @indianmonster1445 Рік тому +1

    Dear sir kindly making Invoicing system with custom invoice style ……… for shopping mall shop

  • @taibasaqer6509
    @taibasaqer6509 2 роки тому

    thank you its so useful :)

    • @DJOamen
      @DJOamen  2 роки тому

      You're welcome!

  • @abdulmunafqaimkhani222
    @abdulmunafqaimkhani222 4 роки тому

    @DJ Oamen . The tutorial is awesome, just a request to add a code in comments which should show us a prompt on click Delete button so it should ask first that are you sure to delete the record. That will be super helpful.
    Regards

    • @DJOamen
      @DJOamen  4 роки тому

      Great suggestion!

  • @shyamalkumarsingha6896
    @shyamalkumarsingha6896 5 років тому

    Very nice tutorial Sir

  • @josephsimon3394
    @josephsimon3394 5 років тому

    I have learnt a lot. thanks

    • @DJOamen
      @DJOamen  5 років тому

      Nice one Joseph, make sure you subscribe to my channel for more video. 👍

  • @is517h
    @is517h 2 роки тому

    Thank you so much

    • @DJOamen
      @DJOamen  2 роки тому

      You're most welcome

  • @CatchItByFaith
    @CatchItByFaith 4 роки тому

    Hello new friend here! Great video! Let's stay connected!

    • @DJOamen
      @DJOamen  4 роки тому

      Thanks and sure

  • @banglatechhotspot2235
    @banglatechhotspot2235 5 років тому +1

    Nice tutorial.

  • @dogarugenu8610
    @dogarugenu8610 4 роки тому

    Hi, I have learned a lot from your tutorials , I really like how you explain things. Do you think if you can make a few tutorial using Javascrip API for excel , I believe all of us would appreciate that.

    • @DJOamen
      @DJOamen  4 роки тому +1

      Great suggestion! But 🤞

  • @christienaraja7870
    @christienaraja7870 3 роки тому

    Thank you sir.

    • @DJOamen
      @DJOamen  3 роки тому

      So nice of you

  • @jacobass9
    @jacobass9 3 роки тому

    Content well presented and very helpful. Just a question.
    Delete button code comes up with a compile error, variable not defined. It then goes on to highlight lstDisplay. Please help. Thank you.

    • @DJOamen
      @DJOamen  3 роки тому

      Check description for the correct code

  • @alancosgrove4728
    @alancosgrove4728 4 роки тому +1

    Thank you for your valuable presentation.
    I have the code nearly working but I am missing something it seems.
    In the search I am not picking up the current region but instead only column A.
    So I search and I use criteria ref number and that is ok.....great so far.
    but if I use any other search criteria for the other column data it returns invalid data etc with the msgbox

    • @DJOamen
      @DJOamen  4 роки тому

      The search function is designed for one column

  • @tousifrahman
    @tousifrahman 4 роки тому +1

    Hello
    i am having difficulties using your code for DELETE function,
    everytime I am selecting a row to delete it is deleting the previous one not the seletecd one. is there any advice you can give me ?

    • @DJOamen
      @DJOamen  4 роки тому

      Correct Code for Delete:
      Dim i As Integer
      For i = 1 To Range("A65356").End(xlUp).Row - 1
      If lstDisplay.Selected(i) Then
      Rows(i + 1).Select
      Selection.Delete
      End If
      Next i

    • @DJOamen
      @DJOamen  4 роки тому

      Check your email

    • @kathleenbasa7610
      @kathleenbasa7610 3 роки тому

      @@DJOamen i also have the correct code but it is deleting the previous one also. Please help

    • @DJOamen
      @DJOamen  3 роки тому

      See the description of the video for the correct code

  • @JadDCPH
    @JadDCPH Рік тому

    It would be super perfect if there's an update button too

    • @DJOamen
      @DJOamen  Рік тому +1

      That's easy, you can add an update button

    • @JadDCPH
      @JadDCPH Рік тому

      @@DJOamen sadly I have no idea how to do it.. hehe

  • @MuhammadShahAlam99
    @MuhammadShahAlam99 2 роки тому

    Excellent,
    How to save delete data another sheet?

    • @DJOamen
      @DJOamen  2 роки тому

      Implement a function to save deleted data

  • @dawidvos67
    @dawidvos67 5 років тому +1

    DV Thankyou for this very informative video. i have a problem i have been following you tutorial. Everything is working very well but for some reason my Search Button is giving me an error, namely "Variable not found" I am not sure how to get the code to you so as to see precisely where the problem lies. If I look at my code it is exactly the same as your code, i only changed the field names to suite my project.

    • @DJOamen
      @DJOamen  5 років тому

      Below are the lines of code used for the search function. Compare it with your codes. Good luck
      Dim iSearch As Long, i As Long
      iSearch = Worksheets("Sheet1").Range("A1").CurrentRegion.Rows.Count
      For i = 10 To iSearch
      If Trim(Sheet1.Cells(i, 1)) Trim(txtSearch.Text) And i = iSearch Then
      MsgBox ("Invalid data")
      txtSearch.Text = ""
      txtSearch.SetFocus
      End If
      If Trim(Sheet1.Cells(i, 1)) = Trim(txtSearch.Text) Then
      txtRef.Text = Sheet1.Cells(i, 1)
      txtFirstname.Text = Sheet1.Cells(i, 2)
      txtSurname.Text = Sheet1.Cells(i, 3)
      txtAddress.Text = Sheet1.Cells(i, 4)
      txtPostCode.Text = Sheet1.Cells(i, 5)
      txtTelephone.Text = Sheet1.Cells(i, 6)
      txtDateReg.Text = Sheet1.Cells(i, 7)
      txtProve.Text = Sheet1.Cells(i, 8)
      txtMemberType.Text = Sheet1.Cells(i, 9)
      txtMemberFees.Text = Sheet1.Cells(i, 10)
      Exit For
      End If
      Next i

    • @khscott3952
      @khscott3952 3 роки тому

      @@DJOamen Hi this is code need set worksheet?

  • @omiorahman6283
    @omiorahman6283 5 років тому

    This is very valuable

  • @mansess
    @mansess 5 років тому

    You just great man

    • @DJOamen
      @DJOamen  5 років тому

      😂👍Thanks

  • @pradnyanale1083
    @pradnyanale1083 5 років тому

    VERY USEFUL

  • @gerglys
    @gerglys 2 роки тому

    Genius :)

  • @jenniferramos9746
    @jenniferramos9746 Рік тому

    can be this use in Google sheet?

    • @DJOamen
      @DJOamen  Рік тому

      I have never tried it

  • @K8Tech
    @K8Tech 2 роки тому

    Thank you, i worte the codes exactly and still getting the error "Object required (Error 424)" in search button code, and the same error is occuring in Reset, the reset button works when i remove (txt.search.Text = "") but the search code is still having the error. can you help please?

    • @DJOamen
      @DJOamen  2 роки тому

      See solution on the Description area of the video

  • @ramachandrannatarajan4234
    @ramachandrannatarajan4234 5 років тому +1

    Brilliant

  • @jmvenus
    @jmvenus 3 роки тому

    Is it possible to down load this code? I downloaded the excel spreadsheet but I'm having problems with the Delete function. I have it all typed out but I'm still working with some errors.
    Thanks great info.

    • @DJOamen
      @DJOamen  3 роки тому

      Sent! Check your email
      However, the correct code for delete is in the description, see it below as well.
      Correct Code for Delete:
      Dim i As Integer
      For i = 1 To Range("A65356").End(xlUp).Row - 1
      If lstDisplay.Selected(i) Then
      Rows(i + 1).Select
      Selection.Delete
      End If
      Next i
      =======================================
      See the correct code for the search function:
      Change
      For i = 10 To iSearch
      To
      For i = 1 To iSearch
      =======================================

    • @jmvenus
      @jmvenus 3 роки тому

      @@DJOamen I copied and pasted your text but I got a RUN TIME ERROR.

    • @DJOamen
      @DJOamen  3 роки тому

      James, click on the link below and I will grant you access to the project. Do it now, I am waiting to grant you access.
      Channel Members can Download the Excel VBA Data Entry Form With Search Function and modify it for their own personal use:
      drive.google.com/file/d/1MejxVwHvHwZMUIALx3BAXdwn5TFnEM72/view?usp=sharing

    • @DJOamen
      @DJOamen  3 роки тому

      Access grant to the project, check your email

  • @bogarttheweeb789
    @bogarttheweeb789 3 роки тому

    hello sir where should i put this?
    To
    For i = 1 To iSearch
    something like this?
    Exit For
    End If
    Next i
    To
    For i = 1 To iSearch ??

    • @DJOamen
      @DJOamen  3 роки тому

      That's for the search button

  • @japsan9411
    @japsan9411 3 роки тому

    hi mate how do i write the code if i want the input is number only for example for the reference number textbox when the user input character it should not accept but numbers only. hoping for your positive feedback . I'm your big fun from phil.

    • @DJOamen
      @DJOamen  3 роки тому +1

      Private Sub txtShift1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
      Debug.Print KeyAscii
      If KeyAscii >= 48 And KeyAscii

    • @japsan9411
      @japsan9411 3 роки тому

      @@DJOamen you're such a good man mate I wasn't expecting your fast reply but look you did it in timely manner ,wow I love you captain

    • @DJOamen
      @DJOamen  3 роки тому

      Thanks man, and you stay safe. Have a nice one

  • @EVC2877
    @EVC2877 5 років тому

    Amazing

  • @mostainbillahavl9772
    @mostainbillahavl9772 3 роки тому

    thanks

    • @DJOamen
      @DJOamen  3 роки тому

      You're welcome!

  • @funlearnunlimited4672
    @funlearnunlimited4672 4 роки тому

    great tutorial, I am wondering if there is a way I can search with name(specially if I have multiple records with same name but are different from each other. So if I put name and keep clicking on search it should start showing records one by one. or may be I can give 2 criteria to be more specific? is that possible? would be great if you can guide or help. Thanks in advance!

    • @DJOamen
      @DJOamen  4 роки тому

      Check this out: How to Create Data Entry Form with Multiple Search function and Protection in Excel
      ua-cam.com/video/wMmsmolIX_k/v-deo.html

    • @fahimmulla6673
      @fahimmulla6673 4 роки тому

      @@DJOamen Thanks for taking time and reply. Will this also work if I search for 'Tony''? Like there are multiple Tony how can I move to next record. Should I just click on Search again?

    • @DJOamen
      @DJOamen  4 роки тому

      Yes

    • @fahimmulla6673
      @fahimmulla6673 4 роки тому

      @@DJOamen Thanks for your quick reply. I was unable to do it so what I instead did is based on text change I populated only specific customer name to list and from that I picked up the exact reference no I was looking for. It works ! But thanks for your response and wonderful videos. Have a nice day!

    • @DJOamen
      @DJOamen  4 роки тому +1

      Thanks dude, have a nice one

  • @abcd2-k4s
    @abcd2-k4s 4 роки тому

    Sir please help insert picture from userform or any folder in a excel sheet in a particular area with fixed size

    • @DJOamen
      @DJOamen  4 роки тому

      See the video tutorial link below of how pictures was added using image object.
      ua-cam.com/users/videob9uinhCC7Jk

  • @vincentmackryansalvan6929
    @vincentmackryansalvan6929 2 роки тому

    hello sir why i have error on exit command code Expected list or seperate ? ty

    • @DJOamen
      @DJOamen  2 роки тому

      Private Sub cmdExit_Click()
      Dim iExit As VbMsgBoxResult
      iExit = MsgBox("Confirm if you want to exit", vbQuestion + vbYesNo, "Registration System")
      If iExit = vbYes Then
      Unload Me
      End If

  • @jerishbhardwaj1889
    @jerishbhardwaj1889 3 роки тому +1

    Hi Sir, thank you for sharing this video. I am having some trouble with Search button. It says that the variable is not declared. You´ve written Sheet1 after for loop:
    for 1=10 to iSearch
    If Trim(Database.Cells(i, 1)) Trim(Search_TXT2.Text) And i = isearch Then
    My sheet name is Database and if I rename it to the same as yours (Sheet1), then also it says that the variable is not defined.

  • @georgemwavalla8741
    @georgemwavalla8741 3 роки тому

    Hi Dj Oamen! My name is george from tanzania, i would like to learn more about MICROSOFT EXCEL AND ACCESS FROM BEGIN TO ADVANCED, USING VISUAL BASIC. DO YOU HAVE WEBSITE THAT I CAN LEARN ONLINE MICROSOFT EXCEL AND ACCESS FROM BASIC TO ADVANCED USING VISUAL BASIC OR MACROS

  • @khairunnisaahmad6416
    @khairunnisaahmad6416 3 роки тому

    hello sir. i follow your code. but in search function for invalid data, even the data available it still shows invalid data msgbox. not sure why

    • @DJOamen
      @DJOamen  3 роки тому

      Try again, check your code

  • @acoe3473
    @acoe3473 3 роки тому +1

    Hi, AddNew doesnt work for mee :( please help

    • @DJOamen
      @DJOamen  3 роки тому

      Carefully watch the video tutorial and check your code

  • @gUdZL0vE
    @gUdZL0vE 5 років тому

    Hi Dj Oamen, i watched and follow your tutorial but when i tried the Search Button it won't Search. I followed all the codes but the search button won't function.What can i do with this? kindly help.

    • @DJOamen
      @DJOamen  5 років тому +1

      =======================================
      See the correct code for the search function:
      Change
      For i = 10 To iSearch
      To
      For i = 1 To iSearch
      =======================================

  • @noslenarual
    @noslenarual Рік тому

    I paid for the membership to download the spreadsheet and it isn’t working.

    • @DJOamen
      @DJOamen  Рік тому

      Access to download was grant this day 15/08/2023. Check your email

  • @omiorahman6283
    @omiorahman6283 5 років тому

    You should have a udemy course

    • @DJOamen
      @DJOamen  5 років тому

      I will look into it

  • @michaels4417
    @michaels4417 5 років тому

    Hello please help me,When typing the code for the Delete buttom it gives me an error error 424

    • @DJOamen
      @DJOamen  5 років тому

      Dim i As Integer
      For i = 0 To Range("A65356").End(xlUp).Row - 1
      If lstDisplay.Selected(i) Then
      Rows(i + 1).Select
      Selection.Delete
      End If
      Next i

    • @DeepakGupta-nf2tt
      @DeepakGupta-nf2tt 4 роки тому

      lstDisplay not clear to me Sir

    • @DeepakGupta-nf2tt
      @DeepakGupta-nf2tt 4 роки тому

      its showing me bug

  • @princessdiannealvarado83
    @princessdiannealvarado83 4 роки тому

    hi, i want to insert a drop down, but how?

    • @DJOamen
      @DJOamen  4 роки тому

      Is on the toolbox

    • @princessdiannealvarado83
      @princessdiannealvarado83 4 роки тому

      @@DJOamen I mean the code :(

    • @DJOamen
      @DJOamen  4 роки тому

      Channel members download the Excel VBA Data Entry Form With Search Function using Userform source code here:
      drive.google.com/file/d/1MejxVwHvHwZMUIALx3BAXdwn5TFnEM72/view?usp=sharing
      OR
      Join this channel to get access to codes, perks, and see more interesting videos. ua-cam.com/channels/Ftw9CfTfMKU9aHZsT2teYg.htmljoin

    • @princessdiannealvarado83
      @princessdiannealvarado83 4 роки тому

      @@DJOamen for print code. it doesn't work, I copied everything you did in the vid, huhu

  • @fernandaaguilar2571
    @fernandaaguilar2571 3 роки тому

    hi, I still have problems with the delete button

    • @DJOamen
      @DJOamen  3 роки тому

      Fernanda Aguilar, you did not subscribe?

  • @socialpensiondswd8858
    @socialpensiondswd8858 5 років тому

    i have also problem in my search box when i try to click search button nothing happens i already change the text box to txtSearch

    • @DJOamen
      @DJOamen  5 років тому

      See the correct code for the search function
      "For i = 1 To iSearch"
      Dim iSearch As Long, i As Long
      'Dim iSearch, i As String
      iSearch = Worksheets("Sheet1").Range("A1").CurrentRegion.Rows.Count
      'If txtSearch.Text = "" Then
      'MsgBox ("Enter a value to search")
      'txtSearch.SetFocus
      'End If
      For i = 1 To iSearch
      If Trim(Sheet1.Cells(i, 1)) Trim(txtSearch.Text) And i = iSearch Then
      MsgBox ("Name not found")
      txtSearch.Text = ""
      txtSearch.SetFocus
      End If
      If Trim(Sheet1.Cells(i, 1)) = Trim(txtSearch.Text) Then
      txtRef.Text = Sheet1.Cells(i, 1)
      txtFirstname.Text = Sheet1.Cells(i, 2)
      txtSurname.Text = Sheet1.Cells(i, 3)
      txtAddress.Text = Sheet1.Cells(i, 4)
      txtPostCode.Text = Sheet1.Cells(i, 5)
      txtTelephone.Text = Sheet1.Cells(i, 6)
      txtDateReg.Text = Sheet1.Cells(i, 7)
      txtProve.Text = Sheet1.Cells(i, 8)
      txtMemberType.Text = Sheet1.Cells(i, 9)
      txtMemberFees.Text = Sheet1.Cells(i, 10)
      Exit For
      End If
      Next i

    • @DJOamen
      @DJOamen  5 років тому

      =======================================
      See the correct code for the search function:
      Change
      For i = 10 To iSearch
      To
      For i = 1 To iSearch
      =======================================

  • @henokgetachew3782
    @henokgetachew3782 3 роки тому

    Why does the delete code shows error 424 by showing end and debug

    • @DJOamen
      @DJOamen  3 роки тому

      Check description

    • @henokgetachew3782
      @henokgetachew3782 3 роки тому

      @@DJOamen all I did was going all the ways you went through in the video to test it right and encoded your codes but it showed me the error I stated.

    • @DJOamen
      @DJOamen  3 роки тому

      I corrected the error and the correction is on the description area of the video tutorial

    • @henokgetachew3782
      @henokgetachew3782 3 роки тому

      @@DJOamen where can I get that sir?

    • @DJOamen
      @DJOamen  3 роки тому

      Below is the Correct delete code on the video description
      Correct Code for Delete:
      Dim i As Integer
      For i = 1 To Range("A65356").End(xlUp).Row - 1
      If lstDisplay.Selected(i) Then
      Rows(i + 1).Select
      Selection.Delete
      End If
      Next i

  • @khadizabdk
    @khadizabdk 2 роки тому

    Can I get this code sir?

    • @DJOamen
      @DJOamen  2 роки тому

      Yes you can, see the description

  • @abhiabhiful
    @abhiabhiful 4 роки тому

    Sir sometimes it's working sometimes it's not why

    • @DJOamen
      @DJOamen  4 роки тому

      Check your code

  • @ryanbarrera2595
    @ryanbarrera2595 5 років тому

    I have question y is it you say i = 10

    • @DJOamen
      @DJOamen  5 років тому

      Yes, because I have 10 columns

  • @Captain-Dave73
    @Captain-Dave73 3 роки тому +1

    Great tutorial, only one problem when I do the code for the search part, it brings back an error in the code and I have followed it line for line, below is where the problem is
    isearch = worksheet("sheet1").range("a1").currentregion.rows.count

    • @DJOamen
      @DJOamen  3 роки тому

      See the solution for the search function in the description