The following are questions we have answered for our clients.
Initialising variables |
It is good programming practice to initialise each variable as soon as you have declared it, for example set numbers to 0, and set strings to “” (empty string). Think about what is the appropriate value for each variable. This can save lots of errors later. |
|
Breaking a line of Visual Basic code
|
| If you want to break a line of VB code over two lines, leave a space and type an underscore, then continue on the next line. |
|
Terminating loops and IFs while programming |
The VB Editor creates the start and end of functions for you. If you do this with every loop and IF statement you create, you will get fewer errors casued by unterminated ifs or loops. So create the end before you fill in the middle. |
|