Macros in microsoft excel and word
1 / 13

Macros in Microsoft Excel and Word - PowerPoint PPT Presentation

  • Uploaded on

Macros in Microsoft Excel and Word. Demo training by Ferenc Nagy. What are the Macros?. Recorded repetitive user actions multistep tasks on documents tedious mcjobs must be exactly reproduced. Why We Use Them?. Save our mind to make important decisions

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'Macros in Microsoft Excel and Word' - vangie

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Macros in microsoft excel and word

Macros in Microsoft Excel and Word

Demo training


Ferenc Nagy

What are the macros
What are the Macros?

  • Recorded

    • repetitive user actions

    • multistep tasks on documents

    • tedious mcjobs

    • must be exactly reproduced

Why we use them
Why We Use Them?

  • Save our mind to make important decisions

  • Help the work of our less experienced colleagues

  • Standardize the look and feel of our reports

  • Be sure that all necessary steps will be done

Step of macro writing and usage








Exec Button

Actions  Keystrokes

Tools  Macros  New

 Start

 VB Editor

 VBE  Debug

 VBE  File  Export

 VBE  File  Import

View  Toolbars  …

Step of Macro Writing and Usage

Recording macros
Recording Macros

  • Tools  Macros  New

  • Properties

    • name

    • hotkey

    • Place

      • current document

      • global

    • description

  • Press keys, enter data, click with mouse

  • Suspend, resume, finish

Methods for starting macros
Methods for Starting Macros

  • Tools  Macros  Start

  • Press hotkey on property screen

  • Press button on toolbar

Cleaning of visual basic text
Cleaning of Visual Basic Text

  • Tools  Macros  VB Editor

  • What is recorded?

    • Not mouse clicks but property changes of VB objects.

  • Discard:

    • accidental detours

    • properties not intended to change


Debugging macros
Debugging Macros

  •  VBE  Debug

  • Stepwise execution

  • Inspect values of variables

  • Topic of advanced courses

Saving and loading macros
Saving and Loading Macros

  • Tools  Macros  VB EditorFile  Export

    • Save macro as .bas or .cls files for future usage

  • Tools  Macros  VB EditorFile  Import

    • Load macro as .bas or .cls file to use in another documents

Definition of an exec button
Definition of an Exec Button

  • Look for a bitmap or plan a new one

  • Create a new toolbar for your macros

  • Place the bitmap and the help text there


  • Plain data files  Excel worksheets

    • Fixedcolumn width checked by validation

    • Colums delimited by commas and parentheses

  • Format and print Word documents

    • Insert headers, footers, page numbers

    • Change font size and page orientation

    • Search and replace

      • given words or punctuation marks

      • ugly accented characters like ôôõÔÕûÛ ôôõÔÕûÛ to nice HungarianőŐűŰ characters


Record a Word macro

Replacing all „is” with „is not”

Paint all „.”-s to red.

Define header:

„In the name of Allah the compassionate and merciful.”

Record an Excel Macro

Opening a text file

Create columns at commas ,

Delete all parentheses ()

Insert a heading in the first row


Thank you for the attention
Thank you for the attention.

  • It’s your turn to learn and use what you have learnt.