Christopher Guertin VAMC – West Palm Beach, FL 1.

Slides:



Advertisements
Similar presentations
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.
Advertisements

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
Developing an Excel Application
Tutorial 8: Developing an Excel Application
Microsoft Office Excel 2013 Core Microsoft Office Excel 2013 Core Courseware # 3253 Lesson 8: Macros, Importing and Exporting Data.
Objectives Understand the software development lifecycle Perform calculations Use decision structures Perform data validation Use logical operators Use.
MACROS CS1100 Computer Science and its Applications CS11001.
Tutorial 12: Enhancing Excel with Visual Basic for Applications
The Web Warrior Guide to Web Design Technologies
Advanced Microsoft Word Hosted by Jared Hoffman Topics Keyboard Shortcuts Customizing Toolbars and Menus Auto Format & Auto Correct Tabs Inserting Pictures.
1 ADVANCED MICROSOFT POWERPOINT Lesson 5 – Using Advanced Text Features Microsoft Office 2003: Advanced.
Automating Tasks With Macros
String Variables Visual Basic for Applications 4.
Customizing Word Microsoft Office Word 2007 Illustrated Complete.
1 Chapter 4 The Fundamentals of VBA, Macros, and Command Bars.
Using the Visual Basic Editor Visual Basic for Applications 1.
Macros Tutorial Week 20. Objectives By the end of this tutorial you should understand how to: Create macros Assign macros to events Associate macros with.
Macros for Beginners Patrick Armatis University of Michigan-Dearborn.
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)
1 CA203 Presentation Application Customizing PowerPoint Lecture # 15.
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
Word Lesson 16 Working with Macros Microsoft Office 2010 Advanced Cable / Morrison 1.
Microsoft Visual Basic 2005 ENRICHMENT CHAPTER Visual Studio Tools for Office.
Objectives Define what a Macro is
Visual Basic Chapter 1 Mr. Wangler.
Languages and Environments Higher Computing Unit 2 – Software Development.
Project 9 Using Visual Basic for Applications (VBA) to Customize and Automate Excel Jason C. H. Chen, Ph.D. Professor of Management Information Systems.
Microsoft Excel 2007 © Wiley Publishing All Rights Reserved. The L Line The Express Line to Learning L Line.
VBA (Visual Basic for Applications) What is Excel, just a spreadsheet? Time for Demos...
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 22 Macros.
1 CA201 Word Application Increasing Efficiency Week # 13 By Tariq Ibn Aziz Dammam Community college.
Copyright 2007, Paradigm Publishing Inc. EXCEL 2007 Chapter 7 BACKNEXTEND 7-1 LINKS TO OBJECTIVES Record & run a macro Record & run a macro Save as a macro-
Enhancing User Interaction Through Programming
PMS /134/182 HEX 0886B6 PMS /39/80 HEX 5E2750 PMS /168/180 HEX 00A8B4 PMS /190/40 HEX 66CC33 By Adrian Gardener Date 9 July 2012.
Introduction to Visual Basic. Quick Links Windows Application Programming Event-Driven Application Becoming familiar with VB Control Objects Saving and.
Chapter 3 Introducing Visual Basic.NET. 3.1 Visual Basic.NET Windows Programming -Used to create Windows, Web, and Console applications -Uses predefined.
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
Spreadsheets in Finance and Forecasting Presentation 9 Macros.
Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented.
Outline Software and Programming Program Structure Tools for Designing Software Programming Languages Introduction to Visual Basic (VBA)
Intro to Excel - Session 7.31 Tutorial 7 - Session 7.3 Developing an Excel Application.
OCC Network Drives  H:\  P:\ 
Key Applications Module Lesson 21 — Access Essentials
Microsoft Access 2010 Chapter 8 Advanced Form Techniques.
Chapter 9 Macros And Visual Basic For Applications.
Practical Programming COMP153-08S Week 5 Lecture 1: Screen Design Subroutines and Functions.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
A lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft® Excel 2013.
Excel Macros 1 Macros or, How to Automate Part of Your Spreadsheet or Worksheet.
INSERT BOOK COVER 1Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Getting Started with VBA for Microsoft Office 2010 by.
Chapter 10 Using Macros, Controls and Visual Basic for Applications (VBA) with Excel Microsoft Excel 2013.
Chapter 11 Enhancing an Online Form and Using Macros Microsoft Word 2013.
A lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft® Excel 2013.
1 CA202 Spreadsheet Application Automating Repetitive Tasks with Macros Lecture # 12 Dammam Community College.
Chapter 10 Using Macros, Controls and Visual Basic for Applications (VBA) with Excel Microsoft Excel 2013.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Using Macros Lesson.
Lesson 17 Mail Merge. Overview Create a main document. Create a data source. Insert merge fields into a main document. Perform a mail merge. Use data.
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
VBA (Visual Basic for Applications) What is Excel, just a spreadsheet?
Microsoft Access Illustrated
Microsoft Excel 2003 Illustrated Complete
Introducing VBA Macros
Chapter 7 Advanced Form Techniques
CIS16 Application Development Programming with Visual Basic
Microsoft Excel 2007 – Level 2
Presentation transcript:

Christopher Guertin VAMC – West Palm Beach, FL 1

 Define what a Macro is  Tell the differences between VB and VBA  Record a Macro  Edit a Recorded Macro  Create a Macro  Explain when and why we would use a Macro in Reflections 2

 Macro (noun) Webster Dictionary  a single computer instruction that stands for a sequence of operations  Sometimes referred to as: Macroinstruction 3

VB – Visual Basic  Standalone  Can be used complied into an executable and run outside the host  Uses same syntax as VBA VBA- Visual Basic For Applications  Requires an Application  Reflections  Excel  Word  Access  Is complied and run within inside the host only  Uses same Syntax as VB 4

 Saves Times  Consistent Data  Easy to make both minor and major changes  Exportable / Importable  Multiple + Easier to use interfaces  Allows for User Input  Software Already Available 5

 Automating almost anything  Mouse, Keyboard, Options on Menu  Creating Dialog Boxes or User Forms  Passing Data Between Applications  Error Checking and Handling 6

 Examples:  Change Screen Fonts, Color, Size  Assign Functions to Keys  Allow User Input for Fileman Reports  Allow Fileman Reports to be Dynamic  Clean up “Dirty Data”  Complete Repetitive Tasks  Works well with Fileman  Transfer Data to/from MS Office Products  No Programmer Access Required 7

 DO NOT put your username or password into a macro to use as an AutoLogin  Code Entered is generally not considered Encrypted 8

9

 Must start with letter  May Contain Numbers, Letters  May use an Underscore  80 Character Max  No Special Characters or Spaces  Example: INPT_WORKLOAD_

 Macro  Start Recording  Stop, Pause, Annotate  Can Edit, Create button, Map to key 11

 Macro  Macros  Edit 12

 Macro  Macros  Type in name under Macro Name: 13

 Setup  Keyboard Map 14

 Setup  Mouse Map 15

 Right Click Tool Bar  Setup  Toolbars  Customize  New Button  After Recording – Check – Create Button 16

17

 Macro  Stop Macro  Ctrl+Break  Create a Button 18

 File  Save As 19

 Setup  Toolbar…  Settings 20

21

 Customize Quick Access Toolbar  More Commands  Customize 22

 Tools  References 23

 Wait for Input into Reflections  Message Box to Help  Input Box  User Form 24

25

26

27

 Could be a course all by itself  Many Options  Label  Text Box  Combo Box  List Box 28

29

30

 Converts Date to Format Useable by VISTA 31

 Format()  Format(expression[, format[, firstdayofweek[, firstweekofyear]]])  strDate = Format(strDate, "dddd, mmm d yyyy")  Wednesday, Aug  MyStr = Format(strTime, "hh:mm:ss AMPM")  05:14:03 AM 32

 Operators  Arithmetic  +, -, *, /  Comparison  >, <, =  Concatenation  &, +  Logical  And, Not, Or 33

 Variables  Naming  Must start with letter  Can be up to 255 characters  Cannot contain a Space but can use underscore  Cannot contain Operators or Special Characters 34

 Should be declared  Procedure  Only for that Procedure  Automatically declared  Dim strDRUG as String  Private  All Procedures in the Module  Private strDRUG as String  Public  All Procedures in All Modules of Project  Public strDRUG as String 35

36

37

38

 If - Then  If – Then – Else  If – Then – ElseIf – Else  GoTo  Select Case 39

 For – Next  For Each – Next  Do While – Loop  Do – Loop While  While – Wend  Do Until – Loop  Do – Loop Until 40

41

42

 Format  Transmit  WaitForString  Ucase  Lcase  Able to create your own  Allows for only one set of code(refer to it) 43

 ‘ Apostrophe  for comment(will not run)  Comment  Top: User, Date, Explain Function  After Code  Declare Variables at Top  TALLman Lettering  Use Error Handler  Try to make more universal 44

 Create in Test Account if possible  Be careful and use checks when user will be creating orders  Validate Data 45

 Create Buttons to Change Column Size 46

47

 Differentiate Screens  Allows users to easily change to preferred color scheme 48

 Macro  Macros  Select from list and click Run 49

 Click on Button Created 50

 From a Macro you can Load a User Form- Auto-Populate Fields Then Send User Input back to Original Macro 51

 The Code will start running and user input will be requested as needed 52

 Many Input boxes can be used or one user form  Default Values may be set 53

 Many Input boxes can be used or one user form  Default Values may be set 54

 The user input is captured and then added to the Fileman routine 55

 The routine appears to be done but more actions are preformed in the background  May have a final stop to allow it to be aborted 56

57

58

 Shawn Toy Created an Amazing Add-In for Excel that will allow text that wraps to be flattened out  nformatics/WIKI/FileMan/FileMan_TextCaptur e_Tools.aspx nformatics/WIKI/FileMan/FileMan_TextCaptur e_Tools.aspx 59

 Add-In  FileMan Tools  File Import Interm 60

 Easy as 1, 2, 3 61

 The header will confirm when it was run and what user input was entered  The data can be copied over to a new sheet or the top part can be deleted to make the headers active 62

 Can be useful to learn Syntax and Concepts 63

MethodsPropertiesEvents 64

 Pharmacy ADPAC Group  Visual Basic Books / References  VBA Books  Google  SharePoint (Future) 65

 SharePoint Site  Share Design Ideas  Integrate Fileman Routines  Seamless Data Transfer to MS Office Products  VBA / Macro Education Series  Reflections  MS Office 66

67