Packt Publishing – 2012, 60 pages
ISBN: 1849688443, 9781849688444
Do you have repetitive tasks that you would like to get rid of for good? Would you like to integrate Office Applications in order to streamline some of your tasks? Then look no further. This compact book will provide you with the knowledge to get your VBA programming off the ground and up to a comfortable cruising speed.
Excel Programming with VBA Starter was born out of the need to have a short, but yet all-encompassing book that would give you a solid foundation in programming with Visual Basic for Applications. This book will enable you to harness the power of VBA in Excel and put it to good use throughout the course of your working day.
Can’t find properties and methods of an object? Don’t know what a property, method or object is? Covering simple and advanced topics, create powerful, reusable examples such as IO, picking files from within Excel and automatically attaching them to e-mails. Learn and use the concept of encapsulation to condense code into bite-size methods to be easily accessed from within your projects, plus much more.
What you will learn from this book
Get started with recording and play macros
Learn to use sub routines, with and without arguments
Create user-defined functions (UDFs)
Work with loops and effectively debug your code
Use UDFs to describe arguments, create custom categories and more
Reference external libraries and use them in your project
Program interaction and sharing with other Office Applications
Learn to work with enumeration
Use advanced features and work with Windows APIs
Create classes and hide away complex code
Approach
This is a starter guide, covering the basics you need to get up and running as quickly as possible.
Who this book is written for
This book is written for users of Excel who want to speed up and streamline normally arduous tasks for maximum productivity.
So, what is VBA?The basic features of VBA
What kind of things can you do with it?
How can you use this technology within your existing projects?
Recording a macro, adding modules, browsing objects, and variablesRecording a macro
Option – Recording a macro from the status bar
Option – Recording from the Developer tab
Executing your code
Saving a workbook containing macros
Adding a module
Browsing objects
Working with variables
The Immediate window
And that's it
Quick start – VBA programmingWorking with loops
Method – For-Next loops
Method – For Each-Next Loops
Method – Do-While and Do-Until loops
Dimensioning and instantiating objects
Subroutines and user-defined functions
Subroutines
Functions
Top features you'll want to know aboutEnumeration
Classes
External libraries
People and places you should get to knowOfficial sites
Resources
Articles and tutorials
Community
Blogs
Twitter