Problem Session 9 - Visual Basic for Applications

Problem Session 9 - Visual Basic for Applications -...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon
Decision Analysis II Problem Session 9
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
On our agenda for today… Visual Basic for Applications
Background image of page 2
Buttons and Macros Lets create a simple button
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Debugging MsgBox Debug.print (Immediate Window – Ctrl+G)
Background image of page 4
Iteration Logic While Loops Dim MyArray(5) As Double For I = 1 To 5 MyArray(I) = Rnd Next I For Each n In MyArray Debug.Print n Next n Array Indexing Starts from 1
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Iteration Logic While-Wend Loops Dim MyArray(5) As Double I = 0 While i<5 MyArray(I) = Rnd I = I+1 Wend For Each n In MyArray Debug.Print n Next n
Background image of page 6
Iteration Logic Do While Do While condition blah blah Loop Do blah blah Loop While condition
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Iteration Logic Do Until Do Until condition blah blah Loop Do blah blah Loop Until condition
Background image of page 8
Conditional Logic Simple Conditionals If condition_holds Then Do_something
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Conditional Logic Nested Conditionals If condition_holds Then Do_something ElseIf another_condition_holds Then Do_something_else End If
Background image of page 10
Conditional Logic More Nesting If condition_holds Then Do_something
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 21

Problem Session 9 - Visual Basic for Applications -...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online