Dialog Boxes – Day 1 Built-in Dialog Boxes Input Box Message Box Custom Dialog Boxes – User Forms.

Slides:



Advertisements
Similar presentations
VISUAL BASIC Visual Basic is derived from the Basic language (Beginner’s All-Purpose Symbolic Instruction Code) Visual Basic uses an event-driven programming.
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
Tutorial 12: Enhancing Excel with Visual Basic for Applications
Visual Basic Project Files:.VBP file: Project File: a small text file that contains the names of other files in the project, as well as some information.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
Visual Basic Project Files:.VBP file: Project File: a small text file that contains the names of other files in the project, as well as some information.
Text Box controls are used when users are required to type some input (during program execution), or output is displayed on the form (known as the user-
Exploring Office Grauer and Barber 1 Creating More Powerful Applications: Introduction to VBA(Wk9)
Automating Tasks With Macros. 2 Design a switchboard and dialog box for a graphical user interface Database developers interact directly with Access.
Visual Basic for Applications Class III. User Forms  We place controls on User Forms to get input from the user.  Common controls include text boxes,
Using the Visual Basic Editor Visual Basic for Applications 1.
Customizing Outlook. Forms Window in which you enter and view information in Outlook Outlook Form Designer The environment in which you create and customize.
Customizing Menus and Toolbars. Manipulating Command Bars Customize: –Right-click any place on a command bar and cick Customize … Customize window: –Toolbars,
FIS 318/618: Financial Systems & Databases Forms and Reports Oakland University School of Business Administration Accounting and Finance Joe Callaghan.
Introduction To Form Builder
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
To type the VB code behind the command button (named cmdPush), Double-Click on the Push Me (caption) command button As a result the Visual Basic Code Window.
Fundamentals of Programming in Visual Basic 3.1 Visual basic Objects Visual Basic programs display a Windows style screen (called a form) with boxes into.
Adding Controls to User Forms. Adding Controls A user form isn’t much use without some controls We’re going to add controls and write code for them Note.
Chapter 9 Macros, Navigation Forms, PivotTables, and PivotCharts
University of Toronto at Scarborough © Andria Hunter, Kersti Wain-Bantin CSCA01 VBA-3 1 Lecture Outline Variable Scope Calling another subprogram Programming.
Microsoft Excel 2007 © Wiley Publishing All Rights Reserved. The L Line The Express Line to Learning L Line.
Finish Decryption 25 minutes. Introduction to VBA Day 4.
Automating Tasks with Visual Basic. Introduction  When can’t find a readymade macro action that does the job you want, you can use Visual Basic code.
Ch 11: Userforms CP212 Winter Topics Designing User Forms o Controls Setting Properties o Tab Order o Testing Writing Event Handlers o Userform_Initialize.
Chapter 11: Introduction to the Visual Basic Environment Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University.
Week 8.  Recap  User Forms  Input Validation Message Boxes Input Boxes  Conversion Functions.
1 1 Lab1 Ismail M. Romi – IT Dept, PPU, Visual Basic 2005 Programming Tour.
Automating Database Processing Chapter 6. Chapter Introduction Design and implement user-friendly menu – Called navigation form Macros – Automate repetitive.
A First Look At Microsoft Visual Basic Lesson 1. What is Microsoft Visual Basic? Microsoft Visual Basic is a software development tool, which means it.
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’
 Application – another name for a program.  Interface – is what appears on the screen when the application is running.  Program Code – is instructions.
OCC Network Drives  H:\  P:\ 
VISUAL BASIC Event Driven, non-procedural Place controls, from toolbox, onto form command, label, time, image Customise controls Write code for command.
Chapter Two Creating a First Project in Visual Basic.
Microsoft Access 2010 Chapter 8 Advanced Form Techniques.
Forms Using. 2  Plan a form  Create a form  Move and resize controls  Modify labels  Modify text boxes Objectives.
1 Creating Windows GUIs with Visual Studio. 2 Creating the Project New Project Visual C++ Projects Windows Forms Application Give the Project a Name and.
Microsoft Access 2002 Illustrated Complete Forms Using.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Building the Events Components– Lesson 111 Building the Events Components Lesson 11.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 10 1 Microsoft Office Access 2003 Tutorial 10 – Automating Tasks With Macros.
Copyright © 2015 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 13 GUI Programming.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
Introduction to Excel VBA UNC Charlotte CPE/PDH Series December 17, 2009.
More Form Tools Combo Box (displays a list) Check Box (yes/no) Frame (groups option buttons) Option Button (exclusive choice) Ref Edit (user selects cells)
CMPF114 Computer Literacy Chapter 3 The Visual Basic Environment 1.
Video in Macromedia Flash (Optional) – Lesson 121 Video in Macromedia Flash (Optional) Lesson 12.
1 CS 106 Computing Fundamentals II Chapter 210 “Adding Controls to User Forms” Herbert G. Mayer, PSU CS Status 7/4/2013 Initial content copied verbatim.
Chapter 4 Getting Started with VBA. Subroutines Subroutine is the logical section of code that performs a particular task. Subroutine is also called a.
BBT 10 Visual Basic 03 Enrichment. Tip Before creating any files for your project, first create a new folder Save all of your files in the folder Pieces.
Slide 1 Controls v Control naming convention –Label: lblName –Command Button: cmdName –Text Box: txtName.
Chapter 5 Introduction To Form Builder. Lesson C Objectives  Use sequences to automatically generate primary key values in a form  Create lists of values.
More Visual Basic!. Creating a Standalone Program A standalone program will allow you to make a program file that can be run like other Windows programs,
TOOLBOX. The Toolbox Intrinsic Controls - always included in the Toolbox ActiveX Controls - separate files with ocx file extension Insertable Objects.
Knowledge Base. Defining a Variable Dim statement Dim intXX As Integer Public in a Module Public dblNN As Double.
Customizing Menus and Toolbars CHAPTER 12 Customizing Menus and Toolbars.
Programming with Visual Basic.NET. Quick Links Program Code The Code Window The Event Procedure Assignment Statements Using AutoList Radio Buttons Buttons.
Chapter 10 Using Macros, Controls and Visual Basic for Applications (VBA) with Excel Microsoft Excel 2013.
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.
Chapter Topics 15.1 Graphical User Interfaces
Excel VBA Day 3 of 3 Tom Vorves.
Chapter 7 Advanced Form Techniques
Custom Form with Spin Button Controls with VBA in Excel In-Class Exercise #12 Objective: Enhance a “standard” DSS interface with a custom “user form”
Custom Forms with VBA in Excel In-Class Exercise #11
Chapter 4 Enhancing the Graphical User Interface
TA: Nouf Al-Harbi NoufNaief.net :::
Presentation transcript:

Dialog Boxes – Day 1 Built-in Dialog Boxes Input Box Message Box Custom Dialog Boxes – User Forms

Form Controls Built-in boxes Form: overall rectangle Controls: tools used to make box function Form Title: form property Label Text Box Command Buttons

User Form Design Decide what data to collect Design form layout Select form tools Write code to use data What event triggers? How is data used? Write macro to display form

Data Collection Data types Text Numbers Yes/No Exclusive options Lists Text Box Check Box, Toggle Frame, Option Buttons Combo Box, List Box Choose control to fit

Example: Temperature Convert °F to °C Decide on Inputs Name Temp, °F Determine Output Name + °C Determine action Event – button? Psuedocode Display Name, Temp in °C Start Get Name, Temp in °F Convert °F to °C End

Example: Temperature Pseudocode Ask for user’s name Ask for temp, °F DegC = (DegF-32)*5/9 Display name and DegC Display Name, Temp in °C Start Get Name, Temp in °F Convert °F to °C End

Temperature Form Layout Name Temp, °F Output Area Go Input Label Output Action x  Use form to collect inputs, display output

Insert User Form Form name Form properties

Form Tools Label Text Box Command button

Object Names Text Boxes txtName txtDegF Labels lblOut Buttons cmdOK Object and variable names must be different! User Form Objects

Action Code Event Driven Form events tied to object on form Double-click object to add code VBA selects name based on form object Form holds data, does nothing Code tells VBA how to use it Data called by object name Assignment statements tell use

Action Code

Form Process Ron 86 Ron, the temperature is 30 Degrees C

Display Macro Form won’t appear until its called Need a macro Goes in module, not form code Need name of form Only one line of code Sub ShowForm( ) MyForm.Show End Sub

Hiding Forms You choose when After code runs Separate button Two forms MyForm.hide – form still active Unload MyForm – closes form Unload Me