Cee3804_VBA_07_notes2

Cee3804_VBA_07_notes2 - Excel Macros and VBA CEE3804...

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

View Full Document Right Arrow Icon
Excel Macros and VBA CEE3804 Computer Applications for Civil and Environmental Engineers
Background image of page 1

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

View Full DocumentRight Arrow Icon
Fall 2007 CEE 3804 2 Topics to be Covered More on VBA Using code modules Understanding procedures Data types Declaring Variables
Background image of page 2
Fall 2007 CEE 3804 3 Macros Definition A macro is: a series of commands recorded within the user interface and wrapped into a single action A procedure is: is a series of actions but, unlike macros, a procedure is written from scratch with the Visual Basic for Applications (VBA) programming language In summary: a series of commands is called a macro when it is recorded, however, a macro is a procedure within the VBA world
Background image of page 3

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

View Full DocumentRight Arrow Icon
Fall 2007 CEE 3804 4 Review of “Kicker” Problem Section 5.1 in Chapra’s textbook (see pages 40- 47) Projectile motion example Illustrates how a sub calls another sub Illustrates how a sub generates multiple results and passes them to another one Sub kickCalculation (main routine) Sub calculationForKicker (called from kickCalculation)
Background image of page 4
Fall 2007 CEE 3804 5 VBA Example : Kicker Worksheet
Background image of page 5

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

View Full DocumentRight Arrow Icon
Fall 2007 CEE 3804 6 Sub : kickCalculation
Background image of page 6
Fall 2007 CEE 3804 7 Sub : calculationForKicker
Background image of page 7

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

View Full DocumentRight Arrow Icon
Fall 2007 CEE 3804 8 Order of Execution Block 1 Branches to calculationForKicker Block 2 Block 3
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/01/2012 for the course CEE 3804 taught by Professor Aatrani during the Spring '07 term at Virginia Tech.

Page1 / 15

Cee3804_VBA_07_notes2 - Excel Macros and VBA CEE3804...

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

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