1 / 18

Microsoft Visual Basic

Microsoft Visual Basic. By Alan I. Rea. Chapter 1: VBA and You Objectives. Learn VBA history Understand why to use VBA Understand programming concepts Use the Word VBA IDE Use the Excel VBA IDE Record macros Manipulate macros Assign a VBA macro Printing a macro. VBA History.

bella
Télécharger la présentation

Microsoft Visual Basic

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Microsoft Visual Basic By Alan I. Rea

  2. Chapter 1: VBA and YouObjectives • Learn VBA history • Understand why to use VBA • Understand programming concepts • Use the Word VBA IDE • Use the Excel VBA IDE • Record macros • Manipulate macros • Assign a VBA macro • Printing a macro

  3. VBA History • Originated from BASIC • BASIC – Beginner’s All-purpose Symbolic Instruction Code • Developed by Dartmouth professors John Kemeny and Thomas Kurtz in 1964

  4. VBA History • Visual Basic Application (VBA) • Programming language • Customized solutions within software applications • Scripting language –programming language that works with another application to perform tasks

  5. VBA History • Visual Basic • Introduced in 1992 • Used to create software programs • Included in Microsoft Office 97 • Word, Excel, Access, and PowerPoint • Included in Microsoft Office 2000 • Word, Excel, Access, PowerPoint, and Outlook 2000

  6. Why Use VBA? • Businesses • Manage inventories • Type letters and memos • Manage budgets and figures • Send and receive e-mail • Give presentations • Horizontal Market Software – general business software that has applications in many industries

  7. Why Use VBA? • Vertical Market Software – software that is unique to a particular industry • Businesses are able to use VBA to customize an existing Microsoft Office application • VBA • Saves businesses money • No need to hire software consultants

  8. Programming Concepts • Programmer • Understand business needs • Map out necessary steps • Pseudocode – uses English statements to create outline of the steps necessary for a piece of software to operate • Steps are called an algorithm • Program flowchart – graphical description of the detailed steps that a piece of software will perform • Logic error – a mistake in the way an algorithm solves a problem

  9. Programming Concepts • Write like a programmer • Coding • Syntax • Reverse words • Comments

  10. Programming Concepts • Working like a programmer • Debugging • Bugs • Syntax errors • Run-time errors

  11. Programming Concepts • VBA’s Role in Microsoft Office • Allows you to do more in a shorter period of time • Decreases development time and costs • Allows users to use the existing power of Microsoft Office • Adds features and functionality to applications quickly

  12. Use the Word VBA IDE • IDE – Integrated Development Environment • Provides tools • Create • Debug • Manage • VBA editor • Macro virus – a computer virus hidden in macro code within a file or template

  13. Use the Word VBA IDE • Opening the VBA IDE • Click Tools on the menu bar, select Macro, click Visual Basic Editor

  14. Use the Excel VBA IDE • Click Tools on the menu bar, select Macro, select Visual Basic Editor

  15. Record Macros • Start Microsoft Word • Click Tools on the menu bar • Select Macro • Click on Record New Macro

  16. Manipulate Macros • Open the VBA IDE • Click on the object containing the Macro • Press F7 to open the Code Window

  17. Assign a VBA Macro • Click Tools on the menu bar • Select Customize • Assign a macro to a button

  18. Printing Macros • Open the VBA IDE • Select File • Click Print

More Related