Название: Excel VBA Programming For Dummies
Автор: Dick Kusleika
Издательство: John Wiley & Sons Limited
Жанр: Программы
isbn: 9781119843092
isbn:
You have access to a PC at work — and probably at home. And those computers are connected to the internet.
You’re running a fairly recent version of Excel.
You’ve been using computers for several years.
You use Excel frequently in your work, and you consider yourself to be more knowledgeable about Excel than the average bear.
You need to make Excel do some things that you currently can’t make it do.
You have little or no programming experience.
You understand that the Help system in Excel can actually be useful. Face it — this book doesn’t cover everything. If you get on good speaking terms with the Help system, you’ll be able to fill in some of the missing pieces.
You need to accomplish some work, and you have a low tolerance for thick, boring computer books.
Icons Used in This Book
Throughout this book, icons in the margins highlight certain types of valuable information that call out for your attention. Here are the icons you’ll encounter and a brief description of each.
The Tip icon marks tips and shortcuts that can save you a great deal of time (and maybe even allow you to leave the office at a reasonable hour).
Remember icons mark the information that’s especially important to know. To siphon off the most important information in each chapter, just skim through these icons.
The Technical Stuff icon marks information of a highly technical nature that you can normally skip over. The Warning icon tells you to watch out! It marks important information that may save you from losing data and ruining your whole day.
Beyond the Book
This book has its very own website where you can download the sample files. To get these files, point your web browser to
https://www.dummies.com/go/excelvbaprogrammingfd6e
Having the sample files will save you a lot of typing. Better yet, you can play around with them and experiment with various changes. In fact, experimentation is the best way to master VBA.
In addition, this book comes with a free access-anywhere Cheat Sheet that includes keyboard shortcuts related to Excel VBA programming. To get this Cheat Sheet, simply go to www.dummies.com
and type VBA Excel Programming For Dummies Cheat Sheet in the Search box and click on the Cheat Sheets tab.
Where to Go from Here
This book contains everything you need to learn VBA programming at a mid-advanced level. The book starts off with the basics of recording macros and builds, chapter by chapter.
If you’re completely new to Excel macros, start with Part 1 to get a refresher on the fundamentals of recording macros. If you have experience recording macros, but want to better understand the VBA behind them, read to Parts 2 and 3. There, you gain a concise understanding of how VBA works, along with the basic foundation you need to implement your own code.
Finally, if you’re familiar with programming concepts and just want to get a quick run-through of some of the more advanced techniques like creating your custom functions and add-ins, feel free to jump to Part 4.
Part 1
Starting Excel VBA Programming
IN THIS PART …
Get to know Visual Basic for Applications.
Work through a real-live Excel programming session.
Chapter 1
Getting to Know VBA
IN THIS CHAPTER
Getting a conceptual overview of VBA
Finding out what you can do with VBA
Discovering the advantages and disadvantages of using VBA
Getting the lowdown on what VBA is
Staying Excel compatible
If you’re eager to jump into VBA programming, hold your horses. This chapter is completely devoid of any hands-on training material. It does, however, contain some essential background information that assists you in becoming an Excel programmer. Just like a great heart surgeon has to take freshman biology, you must learn some basic concepts and terminology so that the more practical aspects you do later make sense.
Understanding VBA Basics
VBA, which stands for Visual Basic for Applications, is a programming language developed by Microsoft — you know, the company that tries to get you to buy a new version of Windows every few years. Excel, along with the other members of Microsoft Office, includes the VBA language (at no extra charge). In a nutshell, VBA is the tool that people use to write programs that automate Excel, such as a program to format a spreadsheet into a monthly report. In the next section, I discuss in more detail the types of tasks you can automate with VBA.
Imagine a robot that knows all about Excel. This robot can read instructions, and it can also operate Excel quickly and accurately. When you want the robot to do something in Excel, you write a set of robot instructions by using special codes. Then you tell the robot to follow your instructions while you sit back and drink a glass of СКАЧАТЬ