Finishing Up Control Arrays Control Arrays are sets

  • Slides: 9
Download presentation
Finishing Up

Finishing Up

Control Arrays ¨ ¨ ¨ Control Arrays are sets of controls. Each one is

Control Arrays ¨ ¨ ¨ Control Arrays are sets of controls. Each one is subscripted, from 0 to n. That allows you to handle all of the controls together. 1. Copy the control 2. Paste it 3. Answer YES to the control array question.

Trapping Errors Private Sub Blah() X=7/0 On Error Goto Err. Handler ‘More lines of

Trapping Errors Private Sub Blah() X=7/0 On Error Goto Err. Handler ‘More lines of code Err. Handler: X=0 If Err. Number = 11 then msg. Box_ (“You tried to divide by 0!!) Exit Sub End Sub

Debugging

Debugging

2 main types of errors ¨ Logic Errors – Something in the programming methodology

2 main types of errors ¨ Logic Errors – Something in the programming methodology ¨ Syntax Errors – Bad lines of code. These are usually caught at design time.

Debugging ¨ Debug. Print – Immediate Window ¨ Commenting out code ¨ Step into,

Debugging ¨ Debug. Print – Immediate Window ¨ Commenting out code ¨ Step into, etc. ¨ Msg. Box(your. Variable) ¨ Breakpoints ¨ Stubs – running functions/subroutines only. ¨ Setting Watch Variables ¨ Step Into/Over/Out

Compiling/Distributing

Compiling/Distributing

Compiling makes the program Executable on other machines ¨ Speeds up execution, because the

Compiling makes the program Executable on other machines ¨ Speeds up execution, because the computer no longer has to compile the program each time. ¨ File / Make xxxxxx. exe ¨ Options – Generally Compile to native code and Optimize for fast code. ¨ Usually – Optimize for fast code.

Package and Deployment Wizard ¨ Get it from Add-Ins ¨ Helps determine fitting program

Package and Deployment Wizard ¨ Get it from Add-Ins ¨ Helps determine fitting program on disk ¨ Helps to set up an installation program ¨ Helps to distribute over network ¨ Helps to distribute over internet ¨ Provides uninstall program