How to Code Clear and Add Command Buttons

  Рет қаралды 65,345

Dinesh Kumar Takyar

Dinesh Kumar Takyar

Күн бұрын

How to Code Clear and Add Command Buttons on user-form to clear data and add data while avoiding duplicate entries.
Details available at this website link: www.exceltrainingvideos.com/h...

Пікірлер: 76
@rockyadam09
@rockyadam09 6 жыл бұрын
Great and very helpful 👍👍👍👍
@andrewclarke2078
@andrewclarke2078 3 жыл бұрын
Its great people like this that fuel the education system
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
Thank you!
@nitanshu4299
@nitanshu4299 5 жыл бұрын
Sir, thanks a ton for such useful video. I really appreciate your training videos and your calm and composed approach throughout the video. In this code which you have used for clear code, it is practically not working for dropdowns as it is messing up the tab. For e.g if i have a dropdown field and enter a value, on pressing , it is not moving to next field.
@Exceltrainingvideos
@Exceltrainingvideos 5 жыл бұрын
The 'tab order' has to be set. This link will help: www.exceltrainingvideos.com/focus-on-control-on-excel-user-form/ at around 4.55 minutes,
@ashrafabdallaattyaelfeky2639
@ashrafabdallaattyaelfeky2639 6 жыл бұрын
Thank you for for evrytheng
@-roshan5810
@-roshan5810 6 жыл бұрын
Thank you
@preeti-zc7te
@preeti-zc7te 4 жыл бұрын
thank you for all of this sir
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Please share the VBA tutorials with your friends too.
@AHMEDHAMED-xf4yn
@AHMEDHAMED-xf4yn 5 жыл бұрын
Dear sir, thank you very much
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Please share with your friends and on social media. You can view more videos in Hindi and English at www.exceltrainingvideos.com/
@MohAboAbdo
@MohAboAbdo 5 жыл бұрын
Thanks ... Thanks ... Thanks
@karuppusamyn515
@karuppusamyn515 5 жыл бұрын
thanks
@mehmetdursunkarabiber8735
@mehmetdursunkarabiber8735 5 жыл бұрын
Dear sir, thank you very much. But i have a question. İf there is a combobox, how can use that codes?
@bandali420
@bandali420 3 жыл бұрын
Very clear and easy to understand the way you do explain codes. i want all of my text and dropdown boxes filled if not error msg will appear and data will not transfer to excel sheet. thanks in advance
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
Glad it helped! This link will provide a solution: www.exceltrainingvideos.com/tag/check-that-all-fields-in-a-userform-are-completed-before-submitting-data-excel-vba/
@panagiotistheodorou4959
@panagiotistheodorou4959 4 жыл бұрын
Dear Mr. Takyar to say that you are Nr One in teaching on line maybe an understatement. Definitely the Best.... Now if you could also do a lesson on: How to make command buttons to high-light when cursor passes over them. Will be an added to me privilege. Thank you so much Sir.
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
We'll work on this question.
@salvadorchacon1485
@salvadorchacon1485 6 жыл бұрын
Hi. Why in the cmdAdd code you don't close the next-loop right after the first comparison? In the code you wrote for each time the next-loop goes the program makes three comparisons (3 x i comparisons), but just one is needed per cycle and once it ends then check whether count is 1 or not (i + 2 comparisons)..
@Exceltrainingvideos
@Exceltrainingvideos 6 жыл бұрын
I wrote the code intuitively because after checking each time I need to do an action. Could you give me your code?
@frankie3005
@frankie3005 5 жыл бұрын
Hi Dinesh, your tutorials are really amazing and well explained. I need help about a data which I applied duplicate prevention to allow me to exempt not to apply the duplicate proof on specific names, not cell or range based in both excel or VBA. Let say I want to be able to enter Jason as much as I want but not the other names. I would really appreciate it if you could help Sir. Thanks Jason
@Exceltrainingvideos
@Exceltrainingvideos 5 жыл бұрын
You can use an IF condition like so: If count > 1 And TextBox1 "Jason" Then
@frankie3005
@frankie3005 5 жыл бұрын
@@Exceltrainingvideos thank you sir. I will give it a try. I appreciate your prompt reply.
@JeTZzOfficial
@JeTZzOfficial 6 жыл бұрын
does not work with numbers in first column, i put words in first column and it works, but it will not error for duplicate numbers ie serial numbers
@madhusudhan5384
@madhusudhan5384 6 жыл бұрын
Dear Sir, Could you please suggest us the link/videos how to share the macro enabled (user form) file so that multiple user can access the workbook simultaneously , since soon i try to share a macro enabled file all macros are disappearing from the file. Please suggest us. Regards
@Exceltrainingvideos
@Exceltrainingvideos 6 жыл бұрын
This link will address your question: www.exceltrainingvideos.com/shared-workbook-in-excel/ For more ideas search www.exceltrainingvideos.com
@balajimIyer4803
@balajimIyer4803 4 жыл бұрын
Have a good day.... May god bless u sir...... I am Balaji M Sharma from Tamilnad....Commerce Graduate and I am Doing my heredity profession like Prohit means Pandit in my village.... When I was working in Garments Co. as a Accountant we use to work in foxpro programmes salary and other accounts activities....After came of the job now i am looking after my traditional job at my own village.... in the meanwhile i use to file GST returns for around 50 dealers in and around my village.....The Dealers use to give their purchase bills from 100 to 300 nos every month... Then I have to Calculate Tax wise Gst Amount and according these value the remaining return procedure will be done.... there i use data entry userform for each dealer to enter their purchase bills... Initially it is very difficult to me to work later i use to see your vba coding videos .....I my self create my own data entry from with help of your coding method and i am succeed with my work... now i can able to work easy and comfortable ... the whole credit goes to u..... I cannot say in words .... YOU are REALLY a NOBLE Person i never seen ever before Thanks a lot My dear Ji.......
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Thanks!
@KulbhushanKumarEXCELtutor
@KulbhushanKumarEXCELtutor 6 жыл бұрын
Sir, is there any solution to get the top 10 value with name without duplicate value and name. Data pick from the columns
@KulbhushanKumarEXCELtutor
@KulbhushanKumarEXCELtutor 6 жыл бұрын
Need urgent help..
@feraskhalil9525
@feraskhalil9525 6 жыл бұрын
sir, I had a problem with clear code, but finally I had noticed that Imust type the typename exactly like this"TextBox" to run correctly, I would share this to help others
@honor62025
@honor62025 4 жыл бұрын
me to
@satyenpurohit3947
@satyenpurohit3947 6 жыл бұрын
Sir kindly share codes for update button, i have gone through all your videos where u tried to explain it, but sorry to say sir none of these update codes work perfectly if used in multiple page userform. Plz share if it is possible
@sanchitkumar9904
@sanchitkumar9904 4 жыл бұрын
Thnx for ur helpful videos " please tell me how to select textbox automatically after adding data to sheet by entering " enter key" not using mouse or tab..... Plz do hurry it's very urgent for me
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
This link will guide: www.exceltrainingvideos.com/focus-on-control-on-excel-user-form/
@sanchitkumar9904
@sanchitkumar9904 4 жыл бұрын
@@Exceltrainingvideos thanks sir..great..
@sanchitkumar9904
@sanchitkumar9904 3 жыл бұрын
Hello sir, namashkar, here is a task for you...make userform with search and update cmnd We have data with many columns I.e. item code, item name, item size, qnty, prices We need to find item and same row's data of qnty change or enter new data ,,,we do this without using mouse and continually doing this...plz if possible
@hollywoodmoviesinhindi215
@hollywoodmoviesinhindi215 6 жыл бұрын
When i click on add button showing data add in sheet what i am doing now. duplicate entry couldn't define???????????
@Exceltrainingvideos
@Exceltrainingvideos 6 жыл бұрын
Are you adding the same data?
@praveen4guitar
@praveen4guitar 6 жыл бұрын
Sir if we need to validate the first textbox as mobile number its not working how to do kindly help
@oney1e139
@oney1e139 6 жыл бұрын
Dear Sir, I've create a userform following your video but facing some problem like duplicate entry couldn't define. And another problem is in update button. While pressing the update button then the update is being only in 2nd column. I would like to attach my created file for your kind reference and will seek for your kind help.
@Exceltrainingvideos
@Exceltrainingvideos 6 жыл бұрын
Have you declared the global variable 'currentrow' right at the top of your macro code?
@oney1e139
@oney1e139 6 жыл бұрын
Yes sir, I've decleared. May i have your email id and send you the file?
@oney1e139
@oney1e139 6 жыл бұрын
Sir, I'm waiting for your kind feedback.
@oney1e139
@oney1e139 6 жыл бұрын
Sir, I'm badly in needed of your help. Please advise.
@albertarcenas1289
@albertarcenas1289 5 жыл бұрын
Sir Dinesh, good day...i hope you can help me for this, I do a practiced using your code in Inventory Management with UserForms video..and i like it...for now, i need a code that if I click the Add Button it will clear all that data in the userform and only the Order Number with new series will be retain..because in your sample if i click the Add Button the data was still there in the userform..I looking forward for you great replies on this...
@Exceltrainingvideos
@Exceltrainingvideos 5 жыл бұрын
This link will help: www.exceltrainingvideos.com/advanced-user-form/ Or search www.exceltrainingvideos.com
@Jayr00911
@Jayr00911 5 жыл бұрын
can you share whole video for this tutorials?
@Exceltrainingvideos
@Exceltrainingvideos 5 жыл бұрын
This link will help: www.exceltrainingvideos.com/how-to-code-clear-and-add-command-buttons-on-userform/ Go right till the bottom of the link.
@m.n.953
@m.n.953 2 жыл бұрын
hi thanks for nice explanation/ i have a question pleas / if i need to add a command botton inside the word document or templat and write a code for it that save the document as the NAME lable field (plain text content control), in a specific bath directory, how can i write the code pleas ? can you drope the line code that do this when i click in this command botton.? pleas your answe and thank you in advance.
@Exceltrainingvideos
@Exceltrainingvideos 2 жыл бұрын
Yes, you can. www.exceltrainingvideos.com/using-invoice-template-to-automate-invoice-creation-and-printing-with-vba/
@m.n.953
@m.n.953 2 жыл бұрын
@@Exceltrainingvideos dear sir thanx for fast answe . i wrote my code like below // the "Sname" it the title of the content control field in proporeties. Private Sub save_print_Click() Dim name As String name = ActiveDocument.SelectContentControlsByTitle("sname") ActiveDocument.SaveAs2 FileName:="C:\Users\Nashat\Desktop\my new docs ame" End Sub can you pleas tell me what wrong in this code . the mashin tell me that thier is a wrong in the line after dim line.
@dread_noughtgaming7485
@dread_noughtgaming7485 5 жыл бұрын
sir if i input same numeric data on textbox1 it will still add.. how to fix this thanks
@Exceltrainingvideos
@Exceltrainingvideos 5 жыл бұрын
Give an example.
@maryjoyisidro1908
@maryjoyisidro1908 5 жыл бұрын
how to code the clear botton in visual studio 6.0 please I have project to pass on tuesday
@Exceltrainingvideos
@Exceltrainingvideos 5 жыл бұрын
This link will help: www.exceltrainingvideos.com/how-to-code-clear-and-add-command-buttons-on-userform/ All the best for your project!
@fentonw09
@fentonw09 4 жыл бұрын
Hi Dinesh, I'm not sure why but when I add the last row string I receive an error.lastrow = Sheet1.Cells(Rows.count, 1).End(x1UP).Row can you help me?
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Sheet1.Cells(Rows.count, 1).End(xlUP).Row l =london
@falmuaini4836
@falmuaini4836 5 жыл бұрын
Hi, How can I contact you please,I need your help in coding if you don't mind.
@falmuaini4836
@falmuaini4836 5 жыл бұрын
I have forwarded one email to you.I will be waiting to hear from you
@superbok2
@superbok2 4 жыл бұрын
having problem with i as variable not defined. I copied the code as it is.
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Did you copy this line of code right at the top before the start of the sub? Are you using Options Explicit? If yes, then you need to declare i as long.
@ManishYadavpc
@ManishYadavpc 5 жыл бұрын
क्या ऐसा हो सकता है कि टेक्सटबॉक्स की वैल्यू जिस सीट में जाए अगर हम टेक्स्ट बॉक्स पर कोई नाम दोबारा टाइप करते हैं तो ऑटोमेटिक नीचे सो करने लगे जैसा कि एक्सेल शीट में होता है जो नाम ऑलरेडी रहता है तो वह पुनः दिखने लगता है
@Exceltrainingvideos
@Exceltrainingvideos 5 жыл бұрын
The question is not quite clear to me. सवाल स्पष्ट नहीं है।
@ManishYadavpc
@ManishYadavpc 5 жыл бұрын
@@Exceltrainingvideos textbox1 जो डाटा एंट्री करते हैं वह एक्सेल शीट में जाता है हम जानना चाहते हैं टेक्स्ट बॉक्स में जब कोई सेम एंट्री दोबारा करें तो लिस्ट के रूप में प्रदर्शित हो जाए जैसे आपका नाम एक्सल शीट में पहले से सेव है और वह नाम दुबारा टेक्स्ट बॉक्स वन में टाइप किया जाए तो लिस्ट बॉक्स के रूप में दिखा दे आयशा कमांड चाहिए
@zelalemmengistu120
@zelalemmengistu120 2 жыл бұрын
Hi ,,,where is next part edit & delete ,,,,,I can't see please send link ,,,,,thanks a lot
@Exceltrainingvideos
@Exceltrainingvideos 2 жыл бұрын
These links will help: www.exceltrainingvideos.com/database-and-customer-relationship-management-with-excel-vba-video-1/ www.exceltrainingvideos.com/how-to-code-clear-and-add-command-buttons-on-userform/ www.exceltrainingvideos.com/create-manage-database-in-excel-with-user-form/
@zelalemmengistu120
@zelalemmengistu120 2 жыл бұрын
Hi sir ,,,,I would like thanks your teaching better than others ,,,so where can I see the next videos like edit and delete .thanks
@falmuaini4836
@falmuaini4836 5 жыл бұрын
hi again, I followed your video step by step, but it doesn't work
@Exceltrainingvideos
@Exceltrainingvideos 5 жыл бұрын
This link will help: www.exceltrainingvideos.com/how-to-code-clear-and-add-command-buttons-on-userform/
@falmuaini4836
@falmuaini4836 5 жыл бұрын
@@Exceltrainingvideos still it doesn't work with me, I'm struggling only with Add command button, the rest is working, an error message showing (compile error, sub or function not defined).
@falmuaini4836
@falmuaini4836 5 жыл бұрын
@@Exceltrainingvideos thanks , I solved the problem ^_^
@Exceltrainingvideos
@Exceltrainingvideos 5 жыл бұрын
Super!
@krmak5727
@krmak5727 5 жыл бұрын
Sir please hindi me samjaiye
@Exceltrainingvideos
@Exceltrainingvideos 5 жыл бұрын
Mera Hindi channel dekhiye: kzfaq.info
@paraglide01
@paraglide01 6 жыл бұрын
Second ;-)
Create and Manage Database in Excel with User-Form
18:39
Dinesh Kumar Takyar
Рет қаралды 50 М.
МАМА И STANDOFF 2 😳 !FAKE GUN! #shorts
00:34
INNA SERG
Рет қаралды 4,7 МЛН
когда повзрослела // EVA mash
00:40
EVA mash
Рет қаралды 4,1 МЛН
ОСКАР vs БАДАБУМЧИК БОЙ!  УВЕЗЛИ на СКОРОЙ!
13:45
Бадабумчик
Рет қаралды 3,4 МЛН
Fully Automated Data Entry User Form in Excel - Step By Step Tutorial
35:41
Userform Calculations in Excel VBA - Calculator Userform
14:16
Excel Destination
Рет қаралды 88 М.
Free Excel VBA Course #32 - Creating Excel Add-ins
9:40
TrumpExcel
Рет қаралды 30 М.
Data Entry With User-Form, Vlookup, Countif, Dynamic Named Ranges
23:09
Dinesh Kumar Takyar
Рет қаралды 22 М.
Excel UserForm Course 1 - Your First UserForm
13:58
TeachExcel
Рет қаралды 99 М.
МАМА И STANDOFF 2 😳 !FAKE GUN! #shorts
00:34
INNA SERG
Рет қаралды 4,7 МЛН