HomeОбразованиеRelated VideosMore From: Dinesh Kumar Takyar

Delete Data from Excel Worksheet Database via a User Form

136 ratings | 17667 views
How to delete data from an Excel worksheet database via a user-form through VBA code. Details available at this website link: https://www.exceltrainingvideos.com/delete-data-from-excel-worksheet-database-via-user-form/
Html code for embedding videos on your blog
Text Comments (31)
Nusrat Ali (26 days ago)
This is my Code Dim x As Long Dim y As Long x = Sheets("Data").Range("A" & Rows.Count).End(xlUp).Row For y = 2 To x If Sheets("Data").Cells(y, 1).Text = TextBox16.Value Then Sheets("Data").Cells(y, 1) = TextBox1.Text Sheets("Data").Cells(y, 2) = TextBox2.Text Sheets("Data").Cells(y, 3) = TextBox3.Text Sheets("Data").Cells(y, 4) = TextBox4.Text Sheets("Data").Cells(y, 5) = TextBox5.Text Sheets("Data").Cells(y, 6) = TextBox6.Text Sheets("Data").Cells(y, 7) = TextBox7.Text Sheets("Data").Cells(y, 8) = TextBox8.Text Sheets("Data").Cells(y, 9) = TextBox9.Text Sheets("Data").Cells(y, 10) = TextBox10.Text Sheets("Data").Cells(y, 11) = TextBox11.Text Sheets("Data").Cells(y, 12) = TextBox12.Text Sheets("Data").Cells(y, 13) = TextBox13.Text Sheets("Data").Cells(y, 14) = TextBox14.Text Sheets("Data").Cells(y, 15) = TextBox15.Text Sheets("Data").Cells(y, 16) = TextBox16.Text End If Next y
Dinesh Kumar Takyar (26 days ago)
Shouldn't you be checking the IF condition before the loop? You mention that your data starts at A6 - this means row 6. Why does your y value start from 2? Please check carefully.
Nusrat Ali (26 days ago)
Hi Dinesh I have data an excel sheet (sheet1) with 15 columns, my data starts from row A6 : O15 when I update the data (i.e to change the name in B column ) then it updates in A2:O15 and paste 3 times like A2:O15,A3:O15, A4:O15. also Colmn A as well. Could you please help me. Thanks
Manju Rohila (6 months ago)
dear sir I to edit row text need edit button on user form
Dinesh Kumar Takyar (6 months ago)
This link will help: https://www.exceltrainingvideos.com/advanced-user-form/ Or search https://www.exceltrainingvideos.com
Kristianne Aries Mendoza (6 months ago)
not working on me.please help
Dinesh Kumar Takyar (6 months ago)
Check your code and watch the video again.
Jalil Noor (6 months ago)
Hello dear Thank you very much your precious video clip about user-form. I am facing a difficulty in data entry because we do a lot of entry in a day, most of the time we don't need to change the entry , like in a table we enter in entry the name of country e.g "Syria'' .( hum country ka name change nahi karte hain. aor her 100 entry k baad change karte hain. is tarah k entry k leea kohi option ya kohi taj veez.
Shwet Patel (7 months ago)
Sir if I delete data from next and back button searching it delete proper data, but when I search data from search button and delete it from delete button it delete different row and give error. how to delete that particular row which search from search button
Shwet Patel (7 months ago)
Sir your currentrow method delete entire row from next and previous search button is properly, but when I search record from search button and fetched data delete from delete button it delete different data so which type of code changes is necessary in search button??? And sir I want to store that particular entire row in different sheet which is deleted from delete button. Thanks in advance sir for your valuable response.
Dinesh Kumar Takyar (7 months ago)
Check your VBA code carefully.
manish champ (10 months ago)
THIS DELETE BUTTON IS DELETING THE FIRST ROW ONLY NOT ANY ROW YOU SEARCH
Dinesh Kumar Takyar (10 months ago)
https://www.exceltrainingvideos.com
Dinesh Kumar Takyar (10 months ago)
Buy a book on basic VBA: Excel VBA Programming For Dummies
manish champ (10 months ago)
update button also not updating the row what i want its also updating the first row
Dinesh Kumar Takyar (10 months ago)
Buy a book on basic VBA: Excel VBA Programming For Dummies
manish champ (10 months ago)
dim currentrow as global , this code not working EXPECTED: NEW OR TYPE NAME
Jawaid Aleem (10 months ago)
Hi Mr. Dines I tried Advance User Form but as I run it jumps into last row, and gives error, hope you can advise or suggest any clue, Jawaid
Dinesh Kumar Takyar (10 months ago)
Do you have data in your worksheet, at least the headers?
peacock wings (11 months ago)
Hello sir showing error 1004
Dinesh Kumar Takyar (11 months ago)
Check your code or share it here. You can also search https://www.exceltrainingvideos.com
Golam Mostafa Shohag (1 year ago)
Dear Sir, Your video is very useful to delete record by using VBA userform. In this video you assigned current row=2. So whenever we run the macros all data in current row is showing and by clicking delete button only that row data are deleting. But if i want to delete data after using search button then data are showing as per search but data is deleted from assigned row.
Dinesh Kumar Takyar (1 year ago)
Hope you noticed that currentrow is a module wide variable: https://www.exceltrainingvideos.com/update-navigate-records-excel-worksheet-with-user-form/
Vinod Vastre (1 year ago)
Please send link of search back and next record in userform. I can't find it online.
mothana mohammed (1 year ago)
dears, kindly i have one problem need your support , i have one excel sheet with VBA micro with multi user login , and i need to share this sheet to one server and all of user can login to the sheet at same time and do saving without effecting to other user , please if you can help me by sending VBA code , thanks a lot for you
Dinesh Kumar Takyar (1 year ago)
What is your code?
Ziaur Rahman (1 year ago)
answer variable to declare!! Thanks for the video. :)
Dinesh Kumar Takyar (1 year ago)
How would you declare the variable? Share it with all of us!
Naresh Sharma (1 year ago)
Pls send vedio in hindi language
Dinesh Kumar Takyar (1 year ago)
https://www.youtube.com/user/MSExcelinHindi

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.