VBA example - Excel 2007: student records program

Student records program

This example is a simple program to manage the records of students. The basic functions of  program are shown below:
    -Insert a new record
    -Update the record
    -Delete the record and
    -Move the records forward and backward

On the form, other controls that we need are 7 Labels, 6 TextBoxes, and 6 CommandButtons.

The information of students are stored in the Excel worksheet(sheet1) as shown below.

Id Name Sex DOB POB Tel
1 Seyha M 9/7/1983 Kampong Thom 012 330 390
2 Channa M 9/7/1983 Kampong Thom 012 330 312
3 Lavay F 8/8/1985 Kampong Cham 098 765 444
4 Rirak Chan M 9/8/1985 Phnom Penh 089 876 900
5 Chan Ry F 9/8/1985 Phnom Penh 098 765 543
6 Sok Chea F 9/9/1984 Phnom Penh 090 765 780

VBA for Excel: records management system using VBA code

The VBA code for this example is shown below:



Enter the text:

This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages:
C, C++, C#, Java, VB.NET, Python, VBA,PHP & Mysql, SQL, JSP, ASP.NET,HTML, CSS, JQuery, JavaScript and other applications such as MS Excel, MS Access, and MS Word. However, we don't guarantee all things of the web are accurate. If you find any error, please report it then we will take actions to correct it as soon as possible.