Skip to Main Content
Computing with Excel and VBA
book

Computing with Excel and VBA

by S.I. Krishan
August 2008
Beginner to intermediate content levelBeginner to intermediate
298 pages
10h 49m
English
Jones & Bartlett Learning
Content preview from Computing with Excel and VBA
Chapter 11 VBA Programming244
VBA code, we will take one more look at the environment for VBA coding by writing
a macro from scratch.
Writing a Macro
The macro that we are going to write will rename the worksheets of an active workbook
as “Red-Sheet,” “Green-Sheet,” and “Blue-Sheet.” It will also select the cells A1:G1 in
each sheet and set their font size to 20 and font color to red, green, and blue, respec-
tively.
We will begin by activating Excel to open a new workbook which will be given the
default name of Book1 or something like that by Excel. To write the macro we need to
activate the Visual Basic Editor; you can do so by choosing any
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Excel Programming with VBA Starter

Excel Programming with VBA Starter

Robert F Martin
Programming Excel with VBA and .NET

Programming Excel with VBA and .NET

Jeff Webb, Steve Saunders

Publisher Resources

ISBN: 9780763756680