Excel Programming with VBA Starter - Robert F Martin - E-Book

Excel Programming with VBA Starter E-Book

Robert F Martin

0,0
16,79 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

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.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 65

Veröffentlichungsjahr: 2012

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

Excel Programming with VBA Starter
Credits
www.PacktPub.com
Support files, eBooks, discount offers and more
www.PacktLib.PacktPub.com
Why Subscribe?
Free Access for Packt account holders
Excel Programming with VBA Starter
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 variables
Recording a macro
Option 1 – Recording a macro from the status bar
Option 2 – 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 programming
Working with loops
Method 1 – For-Next loops
Method 2 – For Each-Next Loops
Method 3 – Do-While and Do-Until loops
Dimensioning and instantiating objects
Subroutines and user-defined functions
Subroutines
Functions
Top features you'll want to know about
Enumeration
Classes
External libraries
People and places you should get to know
Official sites
Resources
Articles and tutorials
Community
Blogs
Twitter
About the author
About the reviewers
Index

Excel Programming with VBA Starter

Excel Programming with VBA Starter

Copyright © 2012 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: October 2012

Production Reference: 1171012

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham B3 2PB, UK.

ISBN 978-1-84968-844-4

www.packtpub.com

Credits

Author

Robert Martin

Reviewers

Jan Karel Pieterse

Peter M Taylor

Acquisition Editor

Alex Newbury

Commissioning Editor

Meeta Rajani

Technical Editor

Vrinda Amberkar

Project Coordinator

Shraddha Bagadia

Proofreader

Aaron Nash

Indexer

Hemangini Bari

Production Coordinator

Prachali Bhiwandkar

Cover Work

Prachali Bhiwandkar

Cover Image

Conidon Miranda

www.PacktPub.com

Support files, eBooks, discount offers and more

You might want to visit www.PacktPub.com for support files and downloads related to your book.

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at <[email protected]> for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

www.PacktLib.PacktPub.com

Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books.

Why Subscribe?

Fully searchable across every book published by PacktCopy and paste, print and bookmark contentOn demand and accessible via web browser

Free Access for Packt account holders

If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.

Excel Programming with VBA Starter

Welcome to Excel VBA Starter. This book has been especially created to provide you with all the information that you need to get up to speed with programming with VBA (Visual Basic for Applications). You will learn the basics of VBA, get started with building your first VBA code, create user-defined functions to work out complex calculations, and see the tricks of the trade when it comes to using VBA with Excel.

This document contains the following sections:

So what is VBA? – find out what VBA actually is, what you can do with it, and why it's so great.

Recording a macro, adding modules, browsing objects, and variables – learn how to record a macro, add modules, browse for objects available in your project, and finally what variables are useful for.

Quick start: VBA programming – this section will get you started on programming with VBA. Here you will learn how to perform some core tasks in VBA. Such tasks include using loops, dimensioning objects, and creating and categorizing User-defined Functions (UDFs).

Top features you need to know about – VBA gives you infinite possibilities when it comes to creating your own solutions. In this section, you will learn some key concepts such as enumeration, classes (defining properties and methods), and referencing external libraries, in particular how to manipulate files and folders.

People and places you should get to know – in this day and age, it is impossible to live without the Internet and it is here that you can find resources as well as help for your VBA woes. This section provides you with many useful links to the project page and forums, as well as a number of helpful articles, tutorials, blogs, and the Twitter feeds of VBA super-contributors.

So, what is VBA?

In this section, you will get to know a bit about VBA, its basic features, what you can do with it, and how you can put it to work with a view to facilitating your daily work, by automating common tasks.

The basic features of VBA

Visual Basic for Applications (VBA) is a programming language built into Microsoft Office applications. As you improve your skills in any application from the Office System, you will eventually realize that although Microsoft Office applications offer a large number of tools, they do not offer everything you need to perform your daily chores. Such chores may include creating a corporate custom-format, a custom function that calculates commission payments, and so on.

Thus, VBA works as a gap-filler; in other words, its main purpose is to ensure that you can do whatever you need to do in your job.

What kind of things can you do with it?

Once you have pushed your experience using the Office application to the limits and you can no longer get your job done due to a lack of built-in tools, using VBA will help avert frustrations you may encounter along the way. VBA enables you to build custom functions, also called User-defined Functions (UDFs), and you can automate tedious tasks such as defining and cleaning formats, manipulate system objects such as files and folders, as well as work together with Windows as a combined system, through its Application Programming Interface (API), and other applications by referencing their object libraries or Dynamic-link Libraries (DLLs).

Of course you can also use VBA to manipulate the Office application that hosts your code. For example, you can customize the user interface in order to facilitate the work you and others do.

An important thing to remember, though, is that the VBA code that you create is used within the host application. In our case, the code will run within Excel. Such VBA programs are not standalone, that is, they cannot run by themselves; they need the host application in order to operate correctly.

How can you use this technology within your existing projects?

You can use