ME 142 Engineering Computation I Custom Dialog Boxes.

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

Creating a User Form. A Better Interface Our programs can use input boxes for input and write on the spreadsheet page for output This works ok but is.
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
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Excel Web Feature Creating Static and Dynamic Web Pages Using Excel.
Tutorial 12: Enhancing Excel with Visual Basic for Applications
Microsoft Visual Basic: Reloaded Chapter Five More on the Selection Structure.
How to get started with Excel VBA. We need to enable programming in Excel  the “Developer menu”
1 After completing this lesson, you will be able to: Format text. Format numbers as currency. Use Format Painter. Add borders to cells. Add shading to.
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Word Project 7 Creating an Online Form.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Word Web Feature Creating Web Pages Using Word.
Operating Systems Day 1. Booting a Computer 1.Switch on the UPS electricity supply - green light electricity failure - red light charging – orange light.
FirstService Residential Signature
Introduction to Visual Basic Chulantha Kulasekere.
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)
Exploring Microsoft Excel 2002 Chapter 8 Chapter 8 Automating Repetitive Tasks: Macros and Visual Basic for Applications By Robert T. Grauer Maryann Barber.
ME 142 Engineering Computation I Macros. Key Concepts Macro Overview Recording a Macro Running a Macro Editing a Macro Using Controls.
Access Tutorial 10 Automating Tasks with Macros
Chapter 9 Macros, Navigation Forms, PivotTables, and PivotCharts
Chapter 5 Java Script And Forms JavaScript, Third Edition.
XP Week 6 – ABC By Aurino Djamaris Bakrie School of Management.
Lab 9 – User Forms Design. User Forms What are user forms? –Known as dialog boxes –Major ways for getting user input An example of using user forms: Monthly.
Saeed Ghanbartehrani Summer 2015 Lecture Notes #4: Working with Variables and User Interfaces IE 212: Computational Methods for Industrial Engineering.
Project 9 Using Visual Basic for Applications (VBA) to Customize and Automate Excel Jason C. H. Chen, Ph.D. Professor of Management Information Systems.
© 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.
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.
® Microsoft Access 2010 Tutorial 11 Using and Writing Visual Basic for Applications Code.
Click your mouse to continue. Ways to Merge Data When you have finished editing your main document and inserting the merge fields, you have several choices.
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Access Project 6 Switchboards, PivotTables, and PivotCharts.
Microsoft Visual Basic 2005 ENRICHMENT CHAPTER Visual Studio Tools for Office.
2. Recording a Macro. Macro Recording Select Record Macro from the Macro file menu and the dialog box opposite will appear Your macro will require a name.
ME 142 Engineering Computation I Macros. Key Concepts Macro Overview Recording a Macro Running a Macro Editing a Macro.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Working with option button, check box, and list box controls Visual Basic for Applications 13.
Access Manual 2 By Dhawala Kovuri Elham S.Khorasani Ismail Guneydas.
Dialog Boxes – Day 1 Built-in Dialog Boxes Input Box Message Box Custom Dialog Boxes – User Forms.
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. Office Access 2003 Lab 2 Modifying a Table and Creating.
ME 142 Engineering Computation I Using Subroutines Effectively.
Chapter 11: Introduction to VBA Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University Name.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
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)
ME 142 Engineering Computation I Input, Output & Documentation.
ME 142 Engineering Computation I Using Subroutines Effectively.
Lab 10. User Forms Design – Code Part ► Lab 9 Review ► Continue ‘Student Record’ Example ► A Car Loan Application.
CMPF114 Computer Literacy Chapter 3 The Visual Basic Environment 1.
Introducing Dreamweaver. Dreamweaver The web development application used to create web pages Part of the Adobe creative suite.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Access 2002 Advanced Form Design.
Clearly Visual Basic: Programming with Visual Basic 2008 Chapter 13 How Long Can This Go On?
Word Processor Version.01 EME 4411 Week 5. The Scroll Bars.
Microsoft Office 2007 Excel Chapter 9 Part 4: Comparing and merging Workbooks.
Chapter 3 I Need a Tour Guide (Introduction to Visual Basic 2010) Clearly Visual Basic: Programming with Visual Basic nd Edition.
COMPREHENSIVE Access Tutorial 11 Using and Writing Visual Basic for Applications Code.
TOOLBOX. The Toolbox Intrinsic Controls - always included in the Toolbox ActiveX Controls - separate files with ocx file extension Insertable Objects.
ME 142 Engineering Computation I Interacting with Spreadsheets.
Customizing Menus and Toolbars CHAPTER 12 Customizing Menus and Toolbars.
Word 2010 Edit Page Layout In this lesson, you will learn how to insert columns and page breaks. How to change the page orientation, paper size, page margins,
Chapter 10 Using Macros, Controls and Visual Basic for Applications (VBA) with Excel Microsoft Excel 2013.
Introducing UserForms Joanna Wyrobek 1. Ms Excel UserForms A UserForm object is a window or dialog box that makes up part of an application's user interface.
Working with UserForms Dr Joanna Wyrobek 1. Displaying a modeless UserForm By default, UserForms are displayed modally. This means that the UserForm must.
Visual Basic .NET BASICS
Microsoft Visual Basic 2005 BASICS
Even More VBA IE 469 Spring 2017.
UserForm.
Custom dialog boxes Unit objectives
Design Tips.
Custom Forms with VBA in Excel In-Class Exercise #11
Presentation transcript:

ME 142 Engineering Computation I Custom Dialog Boxes

Key Concepts Custom Dialog Box Overview Creating a Custom Dialog Box Example Problems

Custom Dialog Box Overview

 A custom designed window or dialog box  More powerful and flexible than InputBox  Creates a professional looking window style interface  My include controls such as buttons, list boxes, text boxes, radio buttons, scroll bars, etc.

Creating a Custom Dialog Box

 Determine basic design and use  Activate VBE and insert a UserForm  Add controls to the UserForm  Modify Properties for the controls as needed  Write code that is executed when controls are activated  Write code that displays the UserForm

Example Problem

Example: Change Case  Create a macro which utilizes a custom dialog box to perform changes of text in selected cells to uppercase, lowercase, or proper case.

Example: Dialog Box Design

Control/FormPropertyNew Value Change Case UserFormName Caption ChangeCase OK CommandButtonName Caption Default OKButton OK True Cancel CommandButtonName Caption Cancel CancelButton Cancel True Options FrameCaptionOptions Upper Case OptionButton Name Caption Accelerator Value OptionUpper Upper Case U True Lower Case OptionButton Name Caption Accelerator OptionLower Lower Case L Proper Case OptionButton Name Caption Accelerator OptionProper Proper Case P

Example: Code  Code for the CancelButton: Unload ChangeCase

Example: Code  Code for the OKButton: If OptionUpper Then For Each cell In Selection cell.Value = UCase(cell.Value) Next cell ElseIf OptionLower Then For Each cell In Selection cell.Value = LCase(cell.Value) Next cell ElseIf OptionProper Then For Each cell In Selection cell.Value = WorksheetFunction.Proper(cell.Value) Next cell End If Unload ChangeCase

Example: Code  Code for the Sub Program: ChangeCase.Show

Homework Help ‘n Hints