The following programming rules must be followed. For now, trust me that they make sense and will help you become better programmers.
Rem written by Glenn Thomas
Option Explicit
The comment tells me whose program this is. The Option Explicit statement requires you to explicitly declare each and every variable you use in your program. You may not appreciate this statement. But, using it will pay big dividends as you begin to write more complex programs.
Commenting every procedure and function is a minimum requirement. I strongly suggest that you use additional comments within your programs to explain your logic, the meaning of identifiers, etc. Based on personal experience, this is one of the most important things you can do to help yourself write understandable programs.
I suggest that you change the default Visual Basic configuration so that the Option Explicit statement is automatically generated for you. You can do this withe the following steps.
From now on, Visual Basic will generate the Option Explicit statement for you whenever you create a Form of Module.
- Start Visual Basic
- Click on Tools;
- Then on Options;
- Select the Edit tab in the dialog box
- Make certain Require Variable Declaration is checked; and
- Click Okay.
In particular, I call you attention to pages 41-42 and 88-90 of the text where the authors discuss well recognized and widely adopted conventions for naming Objects and Variables. I expect you to use these same conventions in your code.
All the rules, including the first, are meant to help you become better programmers. You must observe these rules.
Consequences of Ignoring These Rules
Any project that is submitted, which violates one or more of the above rules,
will receive a score of zero. This is an absolute rule.
No appeals will be listened to.
No excuses will be accepted.
The rules are here.
You have read them and can return to them anytime.
Follow them.