Dissect and Learn Excel® VBA in 24 Hours: Working with ranges

Posted By: naag
Dissect and Learn Excel® VBA in 24 Hours: Working with ranges

Dissect and Learn Excel® VBA in 24 Hours: Working with ranges
English | 2017 | ASIN: B07378QFSC | 148 pages | AZW3 | 0.4 Mb

No matter how complicated a program is, it is made of many smaller and tiny fundamental working parts of programming code. Each of them accomplishes a specific task. Some may just consist of only one or a few lines of code. Knowing the functions of these fundamental working parts, you can then easily write an unlimited number of working programs. And knowing them, you can easily understand the programs written by others and adopt into your programs the ideas and the efficient code that are presented in those programs.

Dissect and Learn Excel VBA in 24 Hours is a series of quick references for intermediate users who are looking for ideas and samples of VBA code to accomplish certain tasks when they are in the process of writing a program.

In this series, you will see thousands of tiny working parts of VBA code that are used to accomplish many simple and yet meaningful tasks. To add a new workbook, to auto-fill a range, to sort a table of data, to generate a table of contents for all chart sheets and worksheets in a workbook, to loop through and manipulate a folder of Excel files, to place a control on the Ribbon, to send an email, and to login to an account in the Internet are some examples of these tiny working parts.

This series is for readers, who have at least a basic understanding of Excel VBA programming. In order to follow the discussions in the series, a reader must know what Sub procedures and Sub functions are, what Visual Basic Editor (VBE) is, how to add a VBA module to a workbook, how to set a reference to an application's type library, how to enable the Auto List Members feature in VBE, how to use the Macro Recorder in Excel in order to find out the methods and properties of objects that you are not familiar with, how to use the Object Browser to check the complete list of members for a particular object, how to write some simple Sub procedures, in which VBA modules you should store your VBA code, and how to use the debugging tools in VBE.

If you are new to Excel VBA, please teach yourself Excel VBA before exploring the contents in the series. You may refer to my earlier book entitled Learn Excel® VBA in 24 Hours - A quick reference for beginners, which was written for those who are new to Excel VBA.

I hope this series of books will serve as quick references in facilitating you to write an unlimited number of working VBA programs. Let Excel VBA work for you.

Book 2: Working with ranges focuses on commonly used operations related to worksheet ranges. Selecting a range, finding the last nonempty cell in a range, retrieving the properties of a range (such as address and font), changing the format of a range, converting formulas in a range to values, conditionally formatting a range, sorting a range, filtering a range, copying a range, and exporting a range out of Excel are some of the operations.

Before you can perform any operations on a range with VBA, the first important step is to get a reference to a Range object that represents the range. The first topic in this book discusses numerous ways to refer to a range. Knowing how to refer to a range builds you a solid foundation to write sensible code and to understand the VBA code written by others on working with ranges.

To understand better a particular concept discussed in the book, simply copy and paste the sample VBA code stated in the book into the Immediate window or into a VBA module, and run or step through the code by using the debugger in VBE.

This book focuses on worksheet ranges in Excel 2007-2016 for Windows. The next book focuses on worksheets, workbooks, and files. It discusses adding and deleting worksheets and workbooks, creating a table of contents with hyperlinks for worksheets and chart sheets in a workbook, synchronizing sheet names and code names, prompting a user to select a file in a folder, writing to a text file, and looping through all Excel files in a folder in order to work on the files – among others.