Access VBA Programming for Beginners - Class 3 -

Slides:



Advertisements
Similar presentations
© 2002 ComputerPREP, Inc. All rights reserved. Excel 2000: Customizing Excel and Using Macros.
Advertisements

Objectives Understand the software development lifecycle Perform calculations Use decision structures Perform data validation Use logical operators Use.
Week 7.  Recap  Input Validation Message Boxes Input Boxes  Conversion Functions  Assessment 2.
Exploring Microsoft Access Chapter 8 Creating More Powerful Applications: Introduction to VBA By Robert T. Grauer Maryann Barber.
Example 2.
String Variables Visual Basic for Applications 4.
Exploring Office Grauer and Barber 1 Creating More Powerful Applications: Introduction to VBA(Wk9)
Input Validation Check the values entered into a text box before beginning any calculations Validation is a form of ‘self-protection’, rejecting bad data.
Input Validation Check the values entered into a text box before beginning any calculations Validation is a form of ‘self-protection’, rejecting bad data.
Repeating Program Instructions Chapter Microsoft Visual Basic.NET: Reloaded 1.
Access VBA Programming for Beginners - Class 1 - by Patrick Lasu
5.05 Apply Looping Structures
Chapter Three Using Variables and Constants Programming with Microsoft Visual Basic th Edition.
Chapter 31 Fundamentals of Programming in Visual Basic (Continue VI) String Properties and Methods: "Visual".Length is 6. "Visual".ToUpper is VISUAL. "123.
Programming with Microsoft Visual Basic 2012 Chapter 7: Sub and Function Procedures.
Creating Embedded Formative Assessment Dr. Steve Broskoske Misericordia University EDU 533 Computer-based Education.
Chapter 3: Using Variables and Constants
CS0004: Introduction to Programming Input and Output.
Saeed Ghanbartehrani Summer 2015 Lecture Notes #4: Working with Variables and User Interfaces IE 212: Computational Methods for Industrial Engineering.
Finish Decryption 25 minutes. Introduction to VBA Day 4.
® Microsoft Access 2010 Tutorial 11 Using and Writing Visual Basic for Applications Code.
Copyright © 2008 Pearson Prentice Hall. All rights reserved. 1 Microsoft Office Excel Copyright © 2008 Pearson Prentice Hall. All rights reserved
Chapter 12: How Long Can This Go On?
Access VBA Programming for Beginners - Class 2 - by Patrick Lasu
VBA Lab 2 I ns.Samia Al-blwi. Visual Basic Grammar Object: Visual Basic is an object-oriented language. This means that all the items in Excel are thought.
Date Variables Visual Basic for Applications 5. Objectives n In this tutorial, you will learn how to: n Reserve a Date variable n Use an assignment statement.
Dale Roberts GUI Programming using Java - Introduction Dale Roberts, Lecturer Computer Science, IUPUI Department of Computer.
Tutorial 51 Programming Structures Sequence - program instructions are processed, one after another, in the order in which they appear in the program Selection.
Microsoft Visual Basic 2008: Reloaded Third Edition Chapter Six The Do Loop and List Boxes.
COMPUTER PROGRAMMING I 5.05 Apply Looping Structures.
Exploring Microsoft Access Chapter 8 Creating More Powerful Applications: Introduction to VBA.
Numbers continued The Integer Data Type Multiple Declarations Parentheses Three Types of Errors.
Input & Output Functions JavaScript is special from other languages because it can accept input and produce output on the basis of that input in the same.
Overview of VBA Programming & Syntax. Programming With Objects u Objects –Properties: attributes or characteristics of an object (e.g., font size, color,
JavaScript, Fourth Edition
ME 142 Engineering Computation I Using Subroutines Effectively.
OV Copyright © 2011 Element K Content LLC. All rights reserved.  Determine the Dialog Box Type  Capture User Input Creating an Interactive Worksheet.
Chapter 3 w Variables, constants, and calculations DIM statements - declaration temporary memory locations identifier, data type, scope data types - values.
ME 142 Engineering Computation I Input, Output & Documentation.
ME 142 Engineering Computation I Using Subroutines Effectively.
Chapter 6 Looping Structures. Do…LoopDo…Loop Statement Can operate statements repetitively Do intx=intx + 1 Loop While intx < 10 –The Loop While operates.
Tutorial 3: Using Variables and Constants1 Tutorial 3 Using Variables and Constants.
Chapter 4 Getting Started with VBA. Subroutines Subroutine is the logical section of code that performs a particular task. Subroutine is also called a.
Controlling Program Flow with Looping Structures
Variables and Expressions Programming Right from the Start with Visual Basic.NET 1/e 7.
VBA Programming Functions and Decisions. If-Then-Else Structure used to consider alternatives If then --or-- If then Else End If.
COMPREHENSIVE Access Tutorial 11 Using and Writing Visual Basic for Applications Code.
Knowledge Base. Defining a Variable Dim statement Dim intXX As Integer Public in a Module Public dblNN As Double.
JavaScript Events Java 4 Understanding Events Events add interactivity between the web page and the user You can think of an event as a trigger that.
ME 142 Engineering Computation I Interacting with Spreadsheets.
JavaScript Events. Understanding Events Events add interactivity between the web page and the user Events add interactivity between the web page and the.
Custom Dialog Box Alternatives And Dealing with FileNames Joanna Wyrobek.
COMPUTER PROGRAMMING I 5.05 Apply Looping Structures.
Chapter 6 Controlling Program Flow with Looping Structures.
COMPREHENSIVE Excel Tutorial 12 Expanding Excel with Visual Basic for Applications.
Subprocedures and Functions Visual Basic provides a number of facilities for creating modularized and reusable program code. The two you will learn about.
IE 8580 Module 4: DIY Monte Carlo Simulation
Apply Procedures to Develop Message, Input, and Dialog Boxes
Repeating Program Instructions
Message, Input, Confirm, and Specialized Dialogs
Objectives Learn about Function procedures (functions), Sub procedures (subroutines), and modules Review and modify an existing subroutine in an event.
Predefined Dialog Boxes
Microsoft Visual Basic 2005: Reloaded Second Edition
WEB PROGRAMMING JavaScript.
VBScript Session 6 Dani Vainstein.
CIS 16 Application Development Programming with Visual Basic
Control Structures Part B - Message and Input Boxes
Message, Input, and Confirm Dialogs
Additional Topics in VB.NET
Tutorial 11 Using and Writing Visual Basic for Applications Code
Presentation transcript:

Access VBA Programming for Beginners - Class 3 - by Patrick Lasu p_lasu@lycos.com

Class 3 - Overview Static Variables Message box Input Box

Static Variables A Static variable retains its value between calls to the procedure as long as the form is open. Syntax: Static varname [As Type] Very useful for maintaining counters within a local procedure. Example: Static intCount As Integer

Message Box A Message box is a handy tool to communicate with the user Gives information to the user Accepts user input There are many pre-set constants that makes the Message box very versatile Many times there is no need to create a custom Message box

Message Box Syntax: MsgBox(prompt[, buttons] [, title] [, helpfile, context]) Prompt = The message text Buttons = Optional – [OK] is default Title = Optional – The text in the blue bar Starting and closing parentheses ( ) are required only if you are receiving user input Return value is an integer between 1 and 7

Input Box Are useful if you want to receive input from a user Not as flexible as Message boxes Has a very “plain” look Accepts user input with either [OK] or [Cancel] buttons Not possible to distinguish between an “empty” user input or selecting [Cancel] It is possible to “control” it with code – Future Class!!!

Input Box Syntax: InputBox(prompt[, title] [, default] [, xpos] [, ypos] [, helpfile, context]) Prompt = Message to the user Title = Optional - The text in the blue bar Default = Optional - Default value provided to the user NOTE: Returns a String value of user input

Review of Class 3 Static variables are good for keeping count in a local procedure Message boxes are very versatile Use them often Input boxes are useful for user input Not the greatest, but it works

Next Class… Variable Conversion IF Statements IIF Statements Select Case Statements