How to get started with Excel VBA. We need to enable programming in Excel  the “Developer menu”

Slides:



Advertisements
Similar presentations
Use the word beloved in a sentence. Explain the rule about the /s/ sound spelled with a C. Give an example. The other team gets to choose any word.
Advertisements

A guide to using PowerPoint
Step-by-Step: Add a Graphical Hyperlink USE the Special Events Final presentation that is still open from the previous exercise. 1.Go to slide 4, and click.
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.
Excel Navigation. Instructions Use this PowerPoint presentation as you answer the Excel Navigation worksheet questions. Have Excel open also and use ALT.
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 8: Developing an Excel Application
Loading Excel Double click the Excel icon on the desktop (if you have this) OR Click on Start All Programs Microsoft Office Microsoft Office Excel 2003.
How to get started with Excel VBA. We need to enable programming in Excel  the “Developer menu”
Advanced Microsoft Word Hosted by Jared Hoffman Topics Keyboard Shortcuts Customizing Toolbars and Menus Auto Format & Auto Correct Tabs Inserting Pictures.
How to prepare a PowerPoint presentation
Automating Tasks With Macros
Automating Tasks With Macros. 2 Design a switchboard and dialog box for a graphical user interface Database developers interact directly with Access.
Macros Excel built-in functions are great but limited Macros are a means for the user to define new functions A macro is a single command that automates.
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 1 بسم الله الرحمن الرحيم Palestine Polytechnic University College of Administrative science and.
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.
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)
By: Jose Mahendra Aji. First you must click the start button on the bottom left of your screen. Type in “Microsoft office excel” in the search section.
Macros in Excel Intro to lab 1. Macroinstructions Macro is recorded in VBA module sequence of Excel operations Macros can automate tasks in Excel Macro.
MS-Access XP Lesson 5. Creating a Query with Expression Builder Eg. Consider the following table. Table Name: Overtime Fields & Data types: Emp No (Number),
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.
11. Visual Basic Macro Recorder. Open Excel Click File -> Save As.
Access Tutorial 10 Automating Tasks with Macros
Chapter 9 Macros, Navigation Forms, PivotTables, and PivotCharts
Hello World In C++ and Microsoft Visual C++. Directions to begin a project 1. Go to All Programs 2. Open Visual Studio C++ 3. Click on New Project 4.
Using Dreamweaver. Slide 1 Dreamweaver has 2 screens that do different things The Document window where you create your WebPages The Site window where.
Introduction to Graphical User Interfaces. Objectives * Students should understand what a procedural program is. * Students should understand what an.
1 CA201 Word Application Increasing Efficiency Week # 13 By Tariq Ibn Aziz Dammam Community college.
PowerPoint. Basic Vocabulary Slide - Presentation - Slide layout – ► ► ► ► a single page in PowerPoint all the slides for a speech all the slides for.
PowerPoint 1 The Basics 1. Save this file to your Apps Folder as YourLastName_PP1 2. Read each slide. 3. Complete each set of numbered directions.
1 CS 106 Computing Fundamentals II Chapter 29 “Creating A User Form” Herbert G. Mayer, PSU CS Status 7/4/2013 Initial content copied verbatim from CS 106.
To make a graph in Excel, first you have to highlight the data you want to graph. To do this, click and drag over the “blocks” you need. Be sure to include.
Spreadsheets in Finance and Forecasting Presentation 9 Macros.
Macromedia Dreamweaver 4.0 INTERFACE This presentation will run automatically.
Image Processing © Copyright William Rowan Objectives By the end of this you will be able to: Manipulate images to achieve special effects.
Copyright © 2001 by Wiley. All rights reserved. Chapter 2: Using Visual Basic to Create a First Project Getting Started with VB Development Environment.
Word Knowledge T T Tic-Tac-Toe T What suffix means action or process? Give an example of a word with this suffix. The word cutting has a double consonant.
Presentations Using PowerPoint. Good Font Choices for Presentations Good Font Choices for Presentations Arial Times New Roman Tahoma Georgia Verdana Font.
Microsoft Access 2010 Chapter 8 Advanced Form Techniques.
Chapter 2 P. 1 Introducing more controls (on the Toolbox) (Fig. 2.1) - Text box - Frame - Option button - Check box - Image Example P. 44 Figure 2.2 Message.
1. Chapter 15 Creating Charts 3 Charting Data in Word A chart or graph presents data visually. A chart depicts numeric data in a graphical format. If.
Course ILT Forms and queries Unit objectives Create forms by using AutoForm and the Form Wizard, and add or modify form headers and footers Open and enter.
Vector logos Help Guide. Getting started Open a blank Word document. Get the ‘Drawing’ toolbar on display: Click on View on the toolbar. Select Toolbars.
Visual Basic CDA College Limassol Campus Lecture:Pelekanou Olga Semester C Week - 1.
MS Excel 2007 Charts Delivering a Message Prof. Donna B. Sanders.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 10 1 Microsoft Office Access 2003 Tutorial 10 – Automating Tasks With Macros.
Fall 2003Sylnovie Merchant, Ph.D. ACCESS Tutorial Note: The purpose of this tutorial is to provide an introduction to some of the functions of ACCESS in.
Photoshop Image Slicing. Reasons to Image Slide To create links out of sliced images To optimise different areas. (flat areas of colour, such as logos,
1 Visual Basic Part I - A tool for customizing your program Principles of GIS
COMPUTER PROGRAMMING I 3.02 Apply Properties Associated with the Controls.
Open the file and click at the top of the sheet where you want to put the Gantt chart.
This is how you invoke the Microsoft Visual Studio 2010 Software. All Programs >> Microsoft Visual Studio 2010.
Open a new Flash File Action Script 2.0. Create a button like you did last lesson and name it Click to Play.
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.
Chapter 3 I Need a Tour Guide (Introduction to Visual Basic 2010) Clearly Visual Basic: Programming with Visual Basic nd Edition.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Using Option Buttons. Option Buttons Are similar to checkboxes. Must appear in groups. Only one button in the group can be selected at a time. Sometimes.
How make a scatter graph using Microsoft Excel. Once Excel is Opened: Input the values from the table into Excel. –Don’t forget the labels. It should.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Chapter 10 Using Macros, Controls and Visual Basic for Applications (VBA) with Excel Microsoft Excel 2013.
Why use PowerPoint? Attracts attention Motivates DynamicAnimated Visual.
word Knowledge Tic-Tac-Toe Explain a prefix and a suffix. How are they alike and different. Give examples of each. Use the word “etched” in a sentence.
Chapter 3: I Need a Tour Guide (Introduction to Visual Basic 2012)
3.01 Apply Controls Associated With Visual Studio Form
Access Project 8 Using Visual Basic for Applications (VBA) and Creating Multi-Page Forms.
Microsoft Excel 2003 Illustrated Complete
Simple Windows Applications
Introduction to Visual Basic 2010
Presentation transcript:

How to get started with Excel VBA

We need to enable programming in Excel  the “Developer menu”

Objectives 1) To understand the components of the VBA interface 2) Understand the difference between objects and properties 3) To use these principles to effect changes in the behaviour of chosen objects 4) To be able to get objects to move around the screen

Make sure the Developer is ticked

Go to Developer  Visual Basic

Programming window opens up, right click on Sheet1 and choose “Insert Form”

Like so

Ensure that you save your work as an excel macro enabled workbook at this stage otherwise you will not be able to access your work again in VB

Click view toolbox insert image

Rename the image box Imglightsoff and import the picture of the light bulb which is off The border style property should be set to 0

Insert another image box and import the picture of the other light bulb which is switched on

Drag out a command button and call CmdLightoff and write turn me off for the caption

Add another command button and call it Cmdlighton and add turn me on for the caption. Double click on the command button should take you to the code window

Add the following code Make the imglightoff visible Make the imglighton visible

Draw out a label at the top of the form and call it lblmessage, leave the caption blank

Add the following code lblmessage.Caption = “turn me off now” in the Cmdlightson_Click button and run the program and

Press Turn me off and Turn me on

The following should be displayed

Try adding this to change the background colour of the image

Extension Activities 1)Change the caption on the label when the light is switched on to read for the on the light “Hello World, you have turned me on” See you can change the back colour on the label to yellow using lblmessage.backcolor = vbyellow 2) Change the caption on the label to read “Goodbye world you have turned me off” See if you can change the background colour of the label to white 3)See if you can use the backcolour of the lightbulb when the light is turned out 4)See if you can change the caption that appears on the command button to cmdlighton.caption to “don’t forget to turn me off when you are finished 5)What can be done to improve the program?