Presentation is loading. Please wait.

Presentation is loading. Please wait.

Macros in Microsoft Excel and Word Demo training by Ferenc Nagy.

Similar presentations


Presentation on theme: "Macros in Microsoft Excel and Word Demo training by Ferenc Nagy."— Presentation transcript:

1 Macros in Microsoft Excel and Word Demo training by Ferenc Nagy

2 What are the Macros? Recorded Recorded repetitive user actionsrepetitive user actions multistep tasks on documentsmultistep tasks on documents tedious mcjobstedious mcjobs must be exactly reproducedmust be exactly reproduced

3 Why We Use Them? Save our mind to make important decisions Save our mind to make important decisions Help the work of our less experienced colleagues Help the work of our less experienced colleagues Standardize the look and feel of our reports Standardize the look and feel of our reports Be sure that all necessary steps will be done Be sure that all necessary steps will be done

4 Step of Macro Writing and Usage Planning Planning Recording Recording Starting Starting Cleaning Cleaning Debugging Debugging Saving Saving Loading Loading Exec Button Exec Button Actions  Keystrokes Actions  Keystrokes Tools  Macros  New Tools  Macros  New  Start  Start  VB Editor  VB Editor  VBE  Debug  VBE  Debug  VBE  File  Export  VBE  File  Export  VBE  File  Import  VBE  File  Import View  Toolbars  … View  Toolbars  …

5 Recording Macros Tools  Macros  New Tools  Macros  New Properties Properties namename hotkeyhotkey PlacePlace current document current document global global descriptiondescription Press keys, enter data, click with mouse Press keys, enter data, click with mouse Suspend, resume, finish Suspend, resume, finish

6 Methods for Starting Macros Tools  Macros  Start Tools  Macros  Start Press hotkey on property screen Press hotkey on property screen Press button on toolbar Press button on toolbar

7 Cleaning of Visual Basic Text Tools  Macros  VB Editor Tools  Macros  VB Editor What is recorded? What is recorded? Not mouse clicks but property changes of VB objects.Not mouse clicks but property changes of VB objects. Discard: Discard: accidental detoursaccidental detours properties not intended to changeproperties not intended to change Why?

8 Debugging Macros  VBE  Debug  VBE  Debug Stepwise execution Stepwise execution Inspect values of variables Inspect values of variables Topic of advanced courses Topic of advanced courses

9 Saving and Loading Macros Tools  Macros  VB EditorFile  Export Tools  Macros  VB EditorFile  Export Save macro as.bas or.cls files for future usageSave macro as.bas or.cls files for future usage Tools  Macros  VB EditorFile  Import Tools  Macros  VB EditorFile  Import Load macro as.bas or.cls file to use in another documentsLoad macro as.bas or.cls file to use in another documents

10 Definition of an Exec Button Look for a bitmap or plan a new one Look for a bitmap or plan a new one Create a new toolbar for your macros Create a new toolbar for your macros Place the bitmap and the help text there Place the bitmap and the help text there

11 Examples Plain data files  Excel worksheets Plain data files  Excel worksheets Fixed column width checked by validationFixed column width checked by validation Colums delimited by commas and parenthesesColums delimited by commas and parentheses Format and print Word documents Format and print Word documents Insert headers, footers, page numbersInsert headers, footers, page numbers Change font size and page orientationChange font size and page orientation Search and replaceSearch and replace given words or punctuation marks given words or punctuation marks ugly accented characters like ôôõÔÕûÛ ôôõÔÕûÛ to nice Hungarian őŐűŰ characters ugly accented characters like ôôõÔÕûÛ ôôõÔÕûÛ to nice Hungarian őŐűŰ charactersHungarian

12 Practice Record a Word macro Record a Word macro 1)Replacing all „is” with „is not” 2)Paint all „.”-s to red. 3)Define header:  „In the name of Allah the compassionate and merciful.” Record an Excel Macro Record an Excel Macro 1)Opening a text file 2)Create columns at commas, 3)Delete all parentheses () 4)Insert a heading in the first row

13 Thank you for the attention. It’s your turn to learn and use what you have learnt. It’s your turn to learn and use what you have learnt.


Download ppt "Macros in Microsoft Excel and Word Demo training by Ferenc Nagy."

Similar presentations


Ads by Google