VBA code to Protect and Unprotect Workbooks

VBA Code Snippets

In a previous VBA Code Snippet, we covered protecting and unprotecting worksheets.  In this post, we will consider protecting and unprotecting workbooks.  The two topics are closely related, so if this post does not provide the information you need, then read that post too. Before getting started, there is an important change in Excel 2013 … Read more

Understanding basic array formulas

Understanding Basic Array Formulas

Have you heard of the mysterious “array formulas”?  Do you use them?  Or are you like most Excel users, you’ve placed them in the “too hard” pile, never to be seen again.  They always seem to crop up in forums as solutions to some tricky formula questions. In this post, I want to introduce to … Read more

Using Custom Lists in Excel

Using Custom Lists in Excel

Do you ever find yourself typing out the same standard lists over and over again, such as lists of products, cost centers, projects or companies?  I do.  It is essential these lists don’t exclude any items and are presented in the same order each time.  Lists of 4 or 5 things are easy to remember, … Read more

VBA code to create, delete and manage folders

VBA Code Snippets

Creating, deleting and renaming folders is a common requirement when automating processes with VBA.  The code snippets below should be sufficient to complete the most common folder tasks. All the code examples below use the built-in Dir() function and its derivatives.  The File System Object methods are not covered in this post but will be … Read more

Obtaining the save status of a file using VBA

Save status of file using VBA

Often when creating a macro, we may need to know the save status a file we are working with.  This post explores some of the options available for understanding and controlling this important aspect of file control. Using the .saved property Within the Visual Basic Editor we can view the Saved property of a workbook. … Read more

Creating custom Map Charts using shapes and VBA

Custom Map Charts

Whenever I see promotional images for expensive BI Dashboard software, they always show the same thing – a map with countries or regions highlighted in different colors.  It sends the subtle message that maps are the pinnacle of Business Intelligence (whether they are or not is a different matter altogether).  Until Excel 2016, these Map … Read more

Automatically open workbooks when Excel starts

Automatically open workbooks

There are a lot of circumstances where it is useful for a specific workbook, or workbooks to open whenever Excel starts: Save time by opening workbooks you always use To control the calculation mode To trigger VBA events when you open Excel This isn’t just something interesting you can do with Excel, it’s actually a … Read more