A Comparison of SAS versus Microsoft Excel and Access’s Inbuilt VBA Functionality Jozef Tarrant, Amadeus Software Ltd. 1 Copyright © 2011 Amadeus Software.

Slides:



Advertisements
Similar presentations
1 VBA Introduction. Basic Components 2 VBA LANGUAGE OFFICE OBJECTS EXCEL OBJECTS ACCESS OBJECTS WORD OBJECTS OUTLOOK OBJECTS POWERPOINT OBJECTS.
Advertisements

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.
Exploring Microsoft Excel 2002 Chapter 9 Chapter 9 A Professional Application: VBA and Date Functions By Robert T. Grauer Maryann Barber Exploring Microsoft.
Tutorial 8: Developing an Excel Application
Introduction to Excel Chapter 2 Excel Fundamentals Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Microsoft Office Excel 2013 Core Microsoft Office Excel 2013 Core Courseware # 3253 Lesson 8: Macros, Importing and Exporting Data.
Tutorial 12: Enhancing Excel with Visual Basic for Applications
VBA Modules, Functions, Variables, and Constants
Lecture Microsoft Access and Relational Database Basics.
Using Visual Basic 6.0 to Create Web-Based Database Applications
Microsoft Excel 2003 Illustrated Complete with Excel Programming.
1 Chapter 4 The Fundamentals of VBA, Macros, and Command Bars.
Quality Assurance CS 615. Mission Statement The Quality Assurance team will provide assurance to stakeholders in CS-615/616 projects that their projects.
CREATE THE DIFFERENCE Before you start Please press F5 to run this show.
1 Business Intelligence: Report Creation and Automation Using Business Objects Dylan Black University of Wisconsin – Platteville
Access VBA Programming for Beginners - Class 1 - by Patrick Lasu
Adding Automated Functionality to Office Applications.
VBA & Excel Barry L. Nelson IEMS 465 Fall Quarter 2003.
Exploring Microsoft Excel 2002 Chapter 8 Chapter 8 Automating Repetitive Tasks: Macros and Visual Basic for Applications By Robert T. Grauer Maryann Barber.
Christopher Guertin VAMC – West Palm Beach, FL 1.
Microsoft Access Ervin Ha.
Computer Science & Engineering 2111 Data Validation and Macros 1 CSE 2111 Lecture-Data Validation and Macros.
Introduction to VBA. What is VBA? VBA stands for Visual Basic for Applications. It is a programming language used exclusively by the Microsoft Office.
Integrate. Automate. eXLerateTM
Copyright © 2006, SAS Institute Inc. All rights reserved. Enterprise Guide 4.2 : A Primer SHRUG : Spring 2010 Presented by: Josée Ranger-Lacroix SAS Institute.
Visual Basic: An Object Oriented Approach 12 – Creating and using ActiveX objects.
Languages and Environments Higher Computing Unit 2 – Software Development.
McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. Extended Learning Module M Programming in Excel with VBA.
VBA (Visual Basic for Applications) What is Excel, just a spreadsheet? Time for Demos...
© McGraw-Hill Companies, Inc., McGraw-Hill/Irwin Extended Learning Module M Programming in Excel with VBA.
McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. Extended Learning Module M Programming in Excel with VBA.
ChE 117 Motivation Lots of Tools Can’t always use “Canned Programs”
Rapid Application Development (RAD) Software Development Approaches.
VBA: A BRIEF INTRODUCTION SEAMUS STEGENGA MEEN FEBRUARY 11, 2015.
Microsoft Excel Macros & Excel Solver (IENG490)
Introduction to VBA MGMI Aug What is VBA? VBA = Visual Basic for Application Excel’s powerful built-in programming language An event-driven.
Using Visual Basic 6.0 to Create Web-Based Database Applications
® Microsoft Access 2010 Tutorial 11 Using and Writing Visual Basic for Applications Code.
Advanced PI Calculation Engine Makes Complex PI Calculations Easy! Use of EDICTvb for Multi-Plant Advanced PI Calculations Dane OverfieldEXELE Information.
Copyright © 2008 Pearson Prentice Hall. All rights reserved. 1 Microsoft Office Excel Copyright © 2008 Pearson Prentice Hall. All rights reserved
Presented by: Brandon McAndrew Jordan Schafer Keith Edwards IT Audit Automation.
Copyright © 2008 Pearson Prentice Hall. All rights reserved. 11 Committed to Shaping the Next Generation of IT Experts. Chapter 10 Customizing a Database.
Visual Basic for Applications Macro Programming For Microsoft Office.
Outline Software and Programming Program Structure Tools for Designing Software Programming Languages Introduction to Visual Basic (VBA)
Microsoft Access Database Software.
University of Sunderland CIF 102/FIF102 Fundamentals of DatabasesUnit 15 Programming in Microsoft Access using VBA Using VBA to add functionality.
MS Access: Introduction 1Database Design. MS Access: Overview MS Access A Database Management System (DBMS) designed to create applications that organize,
Creating Macros in Excel Adding Automated Functionality to Excel & Office Applications.
P6 BTEC Level 3 Subsidiary Diploma in ICT. Automation The end user of a spreadsheet may be proficient in using the software, but the more that you automate.
ME 142 Engineering Computation I Using Subroutines Effectively.
Excel Macros 1 Macros or, How to Automate Part of Your Spreadsheet or Worksheet.
ME 142 Engineering Computation I Using Subroutines Effectively.
Advanced Repetition Structure and String Functions (Unit 10) Visual Basic for Applications.
Introduction to Microsoft Excel Macros COE 201- Computer Proficiency.
Understanding Visual Basic Fundamentals CHAPTER 13 Understanding Visual Basic Fundamentals.
COMPREHENSIVE Access Tutorial 11 Using and Writing Visual Basic for Applications Code.
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.
Tracking Field Placements and Student Data with Microsoft Access
Dave Pendreigh Audit Specialist, HMRC
Pivot Tables, Macros and VBA
VBA (Visual Basic for Applications) What is Excel, just a spreadsheet?
Innovative Technology Solutions
5. Using databases in VB.
Exploring Microsoft Office Access 2007
Creating Macros in Excel
Exploring Microsoft Excel
أ.إسراء الطريقي أ. هاله الشملان , 102 تقن , المعمل الخامس
Summer Engineering Academies
Presentation transcript:

A Comparison of SAS versus Microsoft Excel and Access’s Inbuilt VBA Functionality Jozef Tarrant, Amadeus Software Ltd. 1 Copyright © 2011 Amadeus Software Ltd.

Overview  What is VBA?  VBA Essentials: Modules and Subroutines  Programming an Export from Excel to CSV  Programming an Import from CSV to Access  Comparison of VBA versus SAS Copyright © 2011 Amadeus Software Ltd. 2

What is VBA?  VBA (Visual Basic for Applications) is an event-driven programming language built into most Microsoft Office applications, often informally referred to as ‘Macro’.  It allows us to script and automate almost any procedure that can be done manually.  It lends itself to any procedure that the user finds themselves having to do repetitively.  Or to any task that an administrator would prefer to be automatic and not subject to user input and associated error. Copyright © 2011 Amadeus Software Ltd. 3

VBA is entered inside code modules Copyright © 2011 Amadeus Software Ltd. 4

The Principle Copyright © 2011 Amadeus Software Ltd. 5 Multiple Excel worksheets and workbooks Single Access database read and consolidated into

The Practice Copyright © 2011 Amadeus Software Ltd. 6 Multiple Excel worksheets and workbooks Access database consolidated into Single Excel worksheet exported to

Example of source spreadsheets Copyright © 2011 Amadeus Software Ltd. 7

Demonstration of Process Copyright © 2011 Amadeus Software Ltd. 8

Defining Variables with DIM Statements Copyright © 2011 Amadeus Software Ltd. 9 Dim anyname1 as Integer Dim anyname2 as String Dim anyname3 as Worksheet Dim anyname4 as Database Dim anyname5 as TableDef Dim anyname6 as Boolean Dim anyname7 as Object Dim anyname8 as DAO.Database Dim anyname9 as DAO.Recordset Dim anyname10 as DAO.Field Dim anyname11 Dim anyname1 as Integer Dim anyname2 as String Dim anyname3 as Worksheet Dim anyname4 as Database Dim anyname5 as TableDef Dim anyname6 as Boolean Dim anyname7 as Object Dim anyname8 as DAO.Database Dim anyname9 as DAO.Recordset Dim anyname10 as DAO.Field Dim anyname11

Code Module 1 Highlights Copyright © 2011 Amadeus Software Ltd. 10

Code Module 1 Highlights Copyright © 2011 Amadeus Software Ltd. 11

Code Module 1 Highlights Copyright © 2011 Amadeus Software Ltd. 12

Code Module 2 Highlights Copyright © 2011 Amadeus Software Ltd. 13

Code Module 2 Highlights Copyright © 2011 Amadeus Software Ltd. 14

Code Module 2 Highlights Copyright © 2011 Amadeus Software Ltd. 15

... The halfway stage Copyright © 2011 Amadeus Software Ltd. 16

Creating tables in Access Copyright © 2011 Amadeus Software Ltd. 17  Design view  Data view

Creating forms and associating actions Copyright © 2011 Amadeus Software Ltd. 18

Dialogue boxes in action Copyright © 2011 Amadeus Software Ltd. 19

Target table is updated Copyright © 2011 Amadeus Software Ltd. 20

VBA vs. SAS Copyright © 2011 Amadeus Software Ltd. 21 VBASAS Consolidation through importing to Excel Consolidation through PROC IMPORT or CONNECT TO ODBC IF statements control readingIF and WHERE statements control reading and writing Exporting to Access by creating temporary recordset object Write out directly to an external database

VBA vs. SAS continued Copyright © 2011 Amadeus Software Ltd. 22 VBASAS Explicit loopsImplied loops Variables have to be defined in type and number Allows the user to create variables as and when needed Requires interfaces with external objects to be explicitly programmed and embedded SAS uses built-in, or sometimes additionally licensed, engines to interface with external objects Custom functionsParameterized macros

Conclusions  Both VBA and SAS are perfectly good options to consolidate data from multiple sources  VBA is included as part of MS Office, although no formal support is provided  SAS is much easier to use and benefits from greater discipline across all procedures and functions Copyright © 2011 Amadeus Software Ltd. 23

Copyright © 2011 Amadeus Software Ltd. 24 ... Any Questions? Jozef Tarrant Amadeus Software Ltd. Tel: +44 (0) Web: