Key Concepts 2 Simple VB Procedures Simple VB Applications - take with Other Examples - time permitting.

Slides:



Advertisements
Similar presentations
Chapter 6 - VB 2005 by Schneider1 Do Loop Syntax Do While condition statement(s) Loop Condition is tested, If it is True, the loop is run. If it is False,
Advertisements

Sep-05 Slide:1 VBA in Excel Walter Milner. Sep-05 Slide:2 VBA in Excel Introduction VBA = Visual Basic for Applications Enables end-user programming In.
Excel Object Model.
Using VB with MS Applications R. Juhl, Delta College.
Excel and Visual Basic. Outline Data exchange between Excel and Visual Basic. Programming VB in Excel.
Object Oriented Programming A programming concept which views programs as objects with properties and ways to manipulate the object and the properties.
Visual Basic for Applications. What it does Extends the features and built in functions of Excel – Create and run VB procedures – Some may be easy to.
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Excel Project 7 Using Macros and Visual Basic for Applications (VBA) with Excel.
Using Macros and Visual Basic for Applications (VBA) with Excel
Tutorial 8: Developing an Excel Application
XP New Perspectives on Microsoft Excel 2003, Second Edition- Tutorial 8 1 Microsoft Office Excel 2003 Tutorial 8 – Developing an Excel Application.
Objectives Understand the software development lifecycle Perform calculations Use decision structures Perform data validation Use logical operators Use.
Tutorial 12: Enhancing Excel with Visual Basic for Applications
With Microsoft Excel 2010 © 2011 Pearson Education, Inc. Publishing as Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Excel 2010.
Excel VBA Class Glenn Harris Microsoft Certified Trainer Office Master Instructor Excel Class NYC.
VBA Programming Session #2. Things to Review  Variables  Procedures: Subs & Functions  If…Then  For…Next.
Using the Visual Basic Editor Visual Basic for Applications 1.
Adding Automated Functionality to Office Applications.
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Word Project 8 Working with Macros and Visual Basic for Applications (VBA)
VBA & Excel Barry L. Nelson IEMS 465 Fall Quarter 2003.
Excel Lesson 14 Creating and Using Macros Microsoft Office 2010 Advanced Cable / Morrison 1.
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
Exploring Microsoft Excel 2002 Chapter 8 Chapter 8 Automating Repetitive Tasks: Macros and Visual Basic for Applications By Robert T. Grauer Maryann Barber.
Not in Text CP212 Winter No VBA Required “Regular” Programming traditional programming is sequential in nature o one command executed after another.
Automation Testing- QTP Rajesh Charles Batch No: Date: jan
Macros n Macros are little programs that you can create to automate particular tasks that you may want to execute more easily than having to specify all.
McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. Extended Learning Module M Programming in Excel with VBA.
Object Variables Visual Basic for Applications 3.
Project 9 Using Visual Basic for Applications (VBA) to Customize and Automate Excel Jason C. H. Chen, Ph.D. Professor of Management Information Systems.
VBA (Visual Basic for Applications) What is Excel, just a spreadsheet? Time for Demos...
Finish Decryption 25 minutes. Introduction to VBA Day 4.
ChE 117 Motivation Lots of Tools Can’t always use “Canned Programs”
NetTech Solutions Using Advanced Tools Lesson 5. NetTech Solutions Objectives Use Slide Finder Use the Format Painter Understand the purpose of macros.
The animation is already done for you; just copy and paste the slide into your existing presentation. Dony Pranadiyanta, ST.
Introduction on VBA Lab 05 ins.Tahani Al_dweesh. Lab Objectives Introduction Calculation with VBA Storing and Retrieving Variables in a Worksheet Using.
1 Visual Basic for Applications (VBA) for Excel Prof. Yitzchak Rosenthal.
Microsoft Office 2003: Advanced 1 ADVANCED MICROSOFT ACCESS Lesson 17 – Utilizing Advanced Management Tools.
Chapter 11: Introduction to the Visual Basic Environment Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University.
INSERT BOOK COVER 1Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Office Excel 2010 by Robert Grauer, Keith.
Copyright © 2008 Pearson Prentice Hall. All rights reserved. 1 Microsoft Office Excel Copyright © 2008 Pearson Prentice Hall. All rights reserved
Lab 01 Forms in excel Tahani ALdweesh Insert form into your project. 2. Change form’s properties. 3. Put controls on the form. 4. Change controls’
Copyright © 2001 by Wiley. All rights reserved. Chapter 5: The Repetition Process in Visual Basic Event Driven Loops Determinate Loops Indeterminate Loops.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.
Visual Basic for Applications Macro Programming For Microsoft Office.
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
OCC Network Drives  H:\  P:\ 
Using Visual Basic for Applications in Microsoft Project Sean Vogel.
Basics 2. Write a macro that … … uses a popup message box to say Hello. (msgbox ”Hello”) … writes the contents of the active cell in a message box. (you.
Chapter 9 Macros And Visual Basic For Applications.
I Power Higher Computing Software Development Development Languages and Environments.
Chapter 11: Introduction to VBA Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University Name.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
Introduction to Excel VBA UNC Charlotte CPE/PDH Series December 17, 2009.
Lesson 1. Security At the menu bar at the top you will see the word Tools. Click your mouse on Tools scroll down to Macro. Move the Mouse over and down.
Financial Information Management VB, VBA, VS, VSTO & VBE: Putting it all together Source: Excel VBA Programming by John Walkenbach.
© Stefano Grazioli - Ask for permission for using/quoting: Source: Excel VBA Programming by John Walkenbach.
COMPREHENSIVE Excel Tutorial 12 Expanding Excel with Visual Basic for Applications.
The Advantage Series ©2005 The McGraw-Hill Companies, Inc. All rights reserved Chapter 12 Introducing Visual Basic for Applications Microsoft Office Excel.
Excel Tutorial 8 Developing an Excel Application
Exploring Excel Chapter 7 Automating Repetitive Tasks: Macros and
VBA - Excel VBA is Visual Basic for Applications
VBA (Visual Basic for Applications) What is Excel, just a spreadsheet?
Innovative Technology Solutions
Microsoft Access 2003 Illustrated Complete
Microsoft Office Illustrated
Excel VBA Day 3 of 3 Tom Vorves.
Learning Excel Session 9 and 10 Dr. Chaitali Basu Mukherji.
حلقات التكرار.
Exploring Microsoft Excel
Microsoft Office Excel 2003
Presentation transcript:

Key Concepts 2 Simple VB Procedures Simple VB Applications - take with Other Examples - time permitting

Object Libraries (aka APIs) Allows you to control one Microsoft Office application from another. Project Microsoft Project’s Object Library is a hierarchical organization of “things” contained in a Microsoft Project file (a collection of collections). ResourcesTasksActions AssignmentsDependencies Other Stuff From Deps To Deps

Excel Workbook? Workbook WorksheetsActions RowsColumns Other Stuff Cells Actions

Exchanging Data between Object Libraries & Applications. Project File ResourcesTasksActions AssignmentsDependencies From Deps To Deps

Use VB to Get data from Object Libraries Project File ResourcesTasksActions AssignmentsDependencies Tools/Macro/Visual Basic Editor

VB Procedures can be written in a project file or in a Global file

VB Procedures are written in a “notepad like” environment

VB Procedures are called Sub statements and are written between the Sub and End Sub line A good practice is to Declare Objects that you plan to use with a line that starts with Dim (Dim t as task tells VB that t is a reference to Task Objects)

Simple VB to get values from a project file For/Next Loop – moves VB from one task to the next: For each Task in ActiveProject.Tasks MsgBox Task.Name Next Task This example starts with the first task in a project, displays a message box containing the task name, then continues to the next task until the end of the project is reached.

Simple VB to get values from a project file If/Then – tests if a condition exists: For each Task in ActiveProject.Tasks If Task.Summary = True Then MsgBox Task.Name End if Next Task In this example, the message box will display only if a task is a summary

VB Procedures may not run if your security settings are set to the highest level. Select Tools/Macro/Security to change security level. You can add a digital signature to a macro you write (Tools/Digital Signatures in the VB editor). That lets users know that your VB is safe to run.

If you plan to use objects from an application’s object library, you must select those libraries in the References form (Tools/References in VB editor) Shown to the right are the libraries used in the SSI Tools examples