Course examination is an important task in teaching. It can test the learners' level and detect their mastery of knowledge or skills. Examination requires teachers to make and correct papers, analyze scores. It is a large workload for teachers. A generating and scoring system of exam papers is created by using Excelland VBA programming. The system can make papers automatically, set test times, calculate and analyze scores. It can greatly improve the efficiency of teachers.