View Single Post
 
Old 11-12-2018, 04:55 AM
Marcia's Avatar
Marcia Marcia is offline Windows 7 32bit Office 2007
Expert
 
Join Date: May 2018
Location: Philippines
Posts: 551
Marcia has a spectacular aura aboutMarcia has a spectacular aura aboutMarcia has a spectacular aura about
Default Need help to add vba for Delete, Next and Previous command buttons

My knowledge of VBA is to record a macro and I do this a lot in my line or work and it often works like hiding and unhiding columns. A teacher friend asked my help about data entry and other related school forms that she must submit. I tried creating a user form from scratch but gave up when I needed to write VBAs for the form that I created. I copied J. Walkenbach's Enhanced Data Form, unfortunately something goes wrong when I add a record. I sent an email to John and his answer was the form is not for universal application so he couldn't help me with my issue. So I went back to my original userform and searched the internet for the appropriate VBAs. I made progress with adding data and closing the userform. But when I executed the macro that I copied elsewhere for the Next and Previous buttons, it registered an error message. I am afraid the codes got mangled, so:
1. Please correct the syntax errors;
2. please add the code for the delete command.
3. I tried changing the default colors to make the userform a bit fancier but the result is still the bland blue form. What could be missing in the changes that i made in the properties window?
4. Is it possible to add an icon for the userform in the QAT?

Thank you. BTW this sheet is the data source of the Form that p45cal is currently working on.
Attached is the sample sheet and the codes.
Attached Files
File Type: xlsm SAMPLE.xlsm (45.7 KB, 17 views)
Reply With Quote