Class13 - Class meeting #13 Wednesday, October 6th GEEN...

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

View Full Document Right Arrow Icon
1 1 GEEN 1300 Introduction to Engineering Computing Class meeting #13 Wednesday, October 6 th Excel & Visual Basic for Applications (VBA) Homework #6, posted, due next Wednesday ± Program flow o sequence o selection o repetition 2 Clicker Question What value will be displayed in the message box when this VBA statement is executed? MsgBox -3^2 A) -9 B) 9 C) -6 D) 1/8 E) an error message
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 3 Using built-in functions in VBA code VBA’s built-in functions Excel’s built-in functions There are two families of intrinsic (built-in) functions in Excel/VBA. One is in VBA-world and the other in spreadsheet-world. It is possible to use both families in your VBA code. Common built-in VBA functions (details of use in Help) Abs Sqr Exp Log Sin Cos Tan Atn Int Len Rnd Left Right Mid Val Str Timer UCase LCase MsgBox InputBox Time Date InStr Array 4 How to invoke Excel spreadsheet functions from VBA: Application.WorksheetFunction. function-name ( arguments ) Example: creating a function RangeArray uses Min and Max functions in Excel, not available in VBA
Background image of page 2
3 5 Program Flow 3 fundamental structures sequence selection repetition Sequence execute one statement at a time, in sequential order This is the encompassing structure of all programs: Begin End 6 Selection program branching based on decisions logical condition T F do this, if TRUE do this, if FALSE Program does one thing or another depending whether a logical condition evaluates to TRUE or FALSE There a several specific structures that provide for selection.
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 7 Repetition provides for looping or iteration done looping ?
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/07/2010 for the course CHEN 1300 at Colorado.

Page1 / 14

Class13 - Class meeting #13 Wednesday, October 6th GEEN...

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

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