Академический Документы
Профессиональный Документы
Культура Документы
MACROS
Prepared by
Board of Studies, ICAI
Section 1: MACROS
Learning Objectives
Learn about Macros Settings,
Recording and executing
Macros,
Deleting Macros
Macros
Simplify routine
tasks.
Use macros to
automate some
common functions in
your spreadsheets.
Easily record macros
and play them back
to do the same thing
multiple times.
100hrs Information Technology Training
Macros
A macro is a
piece of computer
code, that is
written for Excel,
using the Visual
Basic for
Applications
(VBA)
programming
language.
Macros
To automate
repetitive tasks, you
can quickly record a
macro. In Microsoft
Office Excel. You can
also create a macro
by using the Visual
Basic Editor in
Microsoft Visual Basic
to write your own
macro script, or to
copy all or part of a
macro to a new
macro.
Macros Settings
In order to view
or alter the Excel
Macro Security
Setting in Excel
2007 :
Select the office
button.
Macros Settings
From the very
bottom of this
drop-down menu,
select Excel
Options
Select the Trust
Center Option and
from within this,
click on the Trust
Center Settings...
button
From within the
Macro Settings
100hrs Information Technology Training
Macros Settings
Trusted Locations
Excel 2007 has
introduced trusted
locations, which are
directories on your
computer that Excel files
can be placed in, if you
want no Macro checks to
be carried out when the
file is opened. This
means that, if placed in
a trusted location, the
Macros in your Excel file
will be enabled,
regardless of the Macro
Security Setting.
Macros Settings
Program Files\Microsoft
Office\Templates
Program Files\Microsoft
Office\Office12\Startup
Program Files\Microsoft
Office\Office12\Library
These locations are listed in the
Trusted Locations option setting
in your Excel Workbook, which
can be accessed by the
following steps:
Select the main menu (from the
Microsoft Excel Logo at the top
left of the workbook)
From the very bottom of this
drop-down menu, select Excel
Options
Select the Trust Center Option
and from within this, click on
the Trust Center Settings...
button
Select the Trusted Locations
100hrs
Information
option from
the leftTechnology
hand menuTraining
Recording Macros
Recording Macros
This will give user
a dialog box. Type
the macros name
(without using
any spaces). This
will give user a
dialog box. Type
macros name
(without using
any spaces)
Recording Macros
2. To assign a CTRL
combination shortcut
keyto run the macro,
in the Shortcut key
box, type any
lowercase letter or
uppercase letter that
you want to use.
3. To include a
description of the
macro, in the
Description box, type
the text that you
want.
4. Click OK to start
recording.
100hrs Information Technology Training
Macros File
Excel has two
other file formats
that store
macros:
1. XLSM files,
which are
macro enabled
workbooks, are
stored using
XML.
2. XLSB files,
which are
workbooks
stored in
100hrs Information Technology Training
Run a Macro
You can execute the
macro you just
recorded by either
clicking on the
Macro button on the
Developer Tab or by
pressing Alt F8
Run a Macro
To see what Excel
did behind the
scenes you can
either click on
Macros button on
Developer Tab and
select Edit or you
can press Alt F11
Delete Macro
Open the
workbook that
contains the
macro that you
want to delete.
1. On the
Developer tab,
in the Code
group, click
Macros.
2. In the Macros
in list, select This
Workbook
3. In the Macro
100hrs
Information
name
box, Technology
click Training
Section 2: Protecting
Worksheets
Learning Objectives
Learn about opening non Excel
files, importing text files,
Protecting worksheets and
protecting Worksheet elements.
1. Click Office
Button >
Open.
2. In the Files of
type box select
the type of file
that has to be
opened or
select All
Protecting Worksheet
If the workbook
contains
confidential
information, a
password can
be applied to
it. This will
allow only
users with the
password to
open and view
the workbook:
100hrs Information Technology Training
Protecting Worksheet
To protect a
workbook follow
the steps given
below:
Open the
workbook and
select Save As
from the Office
Button.
In the Save As
dialog box, click
the Tools button
to display the
dropdown menu,
and
choose General
100hrs Information Technology Training
Options.
Protecting Worksheet
Enter the
password in the
Password to
Open box.
To have a
separate
password for
editing the file,
enter the
password in the
Password to
Modify box.
Click OK.
In the Confirm
Password
100hrs
Information Technology Training
Protecting Worksheet
Click OK to
return to the
Save As
dialog box.
Specify a
filename and
path for the
file and click
Save.
If prompted,
click Yes to
replace the
Protecting Worksheet
Protecting a
Shared Workbook:
When a workbook is
shared by many
users, the Track
Changes feature (for
tracking edits from
the other users) can
be helpful. Excel also
enables users to
share a workbook
and track the
changes. When a
password is entered,
the tracked changes
cannot be removed.
Protecting Worksheet
To protect and
share a workbook
with tracked
changes,
Select Review >
Protect Workbook
and Share
Workbook option.
Protecting Worksheet
The Protect
Shared Workbook
dialog box
appears.
Check the
Sharing with
Track Changes
option, and enter
a password if
needed.
100hrs Information Technology Training
Protecting Worksheet
Elements
1. Select the
worksheet that
you want to
protect.
2. To unlock any
cells or ranges
that you want
other users to be
able to change,
do the following:
Protecting Worksheet
Elements
Select each cell or
range that you want to
unlock.
On the Home tab, in the
Cells group, click
Format, and then click
Format Cells.
Protecting Worksheet
Elements
To hide any
formulas
that you don't want to
be visible, do the
following:
In the worksheet, select
the cells that contain the
formulas that you want
to hide.
On the Home tab, in the
Cells group, click
Format, and then click
Format Cells.
On the Protection tab,
select the Hidden check
box, and then click OK.
100hrs Information Technology Training
1. Create a new
workbook and
enter any data
that you want to
provide, or open
an existing
workbook that you
want to make
available for
multiuser editing.
2. On the Review
tab, in the
Changes group,
click Share
Workbook.
3. On the Editing
tab, select the
Allow changes
by more than
one user at the
same
time.
This Training
100hrs
Information
Technology
4. On the
Use
Shared
Advanced tab,
select the
Collaborate
options
that you want to
use for tracking
and updating
changes, and
then click OK.
5. Do one of the
following:
If this is a new
workbook, type a
name in the File
name box.
If this is an existing
workbook, click OK to
save the workbook,
click Microsoft
Office Button , and
then Information
click Save
As. Training
100hrs
Technology
Workbook to
7. If the workbook
contains links to other
workbooks or
documents, verify the
links and update any
links that are broken,
and then click Save
on the Quick Access
Toolbar, or press
CTRL+S.
Using the
The conversion
feature Feature
allows you
to open
worksheets
created by other
programs and
convert them to
Excel 2007
worksheets,
convert formulas
into the values
they display, and
convert graphic
objects into
bitmapped
graphics
Conversion
.
100hrs Information Technology Training
Answers
1. A
2. C
3. B
4. D
5. D
6. A
7. D