VBA Automation for Excel 2019 Cookbook
Solutions to automate routine tasks and increase productivity with Excel and other MS Office applications
Mike Van Niekerk
- 362 páginas
- English
- ePUB (apto para móviles)
- Disponible en iOS y Android
VBA Automation for Excel 2019 Cookbook
Solutions to automate routine tasks and increase productivity with Excel and other MS Office applications
Mike Van Niekerk
Información del libro
A comprehensive guide to gaining a 360-degree overview of the VBA programming language and learning how to build your own programs for automating routine tasks
Key Features
- Extend the capabilities of Excel and other Office applications with the help of Microsoft VBA
- Take your Excel programming skills to the next level by creating custom applications with dialogue boxes and the range object
- Automate repetitive and monotonous office work with VBA Excel programming
Book Description
Visual Basic for Applications (VBA) is a programming language developed by Microsoft to automate tasks in MS Office applications. This book will help you to focus on the essential aspects of your role by automating mundane tasks in Excel and other Office applications. With comprehensive coverage of VBA delivered in the form of practice problems and bite-sized recipes, this book will help you to hit the ground running.
Unlike most books that assume prior programming experience, this book starts with the fundamentals and gradually progresses to solving bigger problems.
You'll start by becoming familiar with VBA so that you can start recording macros right away. With this foundation in place, you'll advance to using the full capabilities of the language as you apply loops, functions, and custom dialog boxes to design your own automation programs. You'll also get to grips with embedded macros and other advanced tools to enhance productivity and explore topics relating to app performance and security. Throughout this VBA book, you'll cover multiple practice projects in Excel, Word, and PowerPoint while exploring tips and best practices to hone your skills.
By the end of this book, you'll have developed the skills you need to use VBA to create your own programs that control MS Office applications.
What you will learn
- Understand the VBA programming language's role in the context of the MS Office suite
- Discover various aspects of VBA programming such as its terminology, syntax, procedures, functions, and forms
- Investigate the elements, features, and characteristics of the VBA Editor to write and edit custom scripts
- Automate Excel sheets with the help of ranges
- Explore error handling and debugging techniques to catch bugs in your programs
- Create and use custom dialog boxes to collect data from users
- Customize and extend Office apps such as Excel, PowerPoint, and Word
Who this book is for
This book is for experienced Excel users, business analysts, finance professionals, and business users looking to boost their productivity by learning VBA programming to automate repetitive, tedious, or complex tasks. No prior programming experience is required to get started with this book.
Preguntas frecuentes
Información
Chapter 1: Getting Started with VBA
- Investigating VBA code
- Recording a macro
- Testing the macro
- Using the VBA Editor
- Editing the code by changing cell references
- Saving the file with an embedded macro
- Using the Trust Center for macro security
- Creating a customized ribbon
Technical requirements
Investigating VBA code
Getting ready
- Open MS Excel and select Blank workbook from the opening screen.
- Open the 01_VBA_Code.xlsm sample file. Click on [Enable Content] on the SECURITY WARNING ribbon.
- If the Developer ribbon is not visible, activate the Backstage View by clicking on File, which will display the following screen:
- From the category list on the left, select the last option, Options. The Excel Options dialog box appears:
- From the categories on the left, select Customize Ribbon.
- To the far right, under the Main Tabs heading, look for the Developer option. Select the checkbox.
- Click on OK to accept the change. The dialog box will close, and Excel will now display the Developer tab.
How to do it…
- With 01_VBA_Code.xlsm open, click on the Developer tab:
- In the Code group (the first group on the left of the ribbon), select the Macros icon. The Macro dialog box opens:
- The VBA code we want to investigate is contained in the only macro: Area_Bold. Click on the Edit button. The Microsoft Visual Basic for Applications window will open. Maximize the window, if necessary:
- In the code window (the large area on the right), a short VBA subroutine is displayed.