New dynamic yearly calendar

I have added to the downloads page a new dynamic yearly calendar template.  You access the calendar through a user form which has two combo boxes: the first one to specify the year and the second  to select the start date of the week. You … [Continue reading]

How to protect VBA code in Excel 2010

If you have an EXCEL workbook that includes some VBA code, and you want to hide that code, either to protect your intellectual property or simply to prevent others from messing up your code accidently , then follow these steps: 1. In the Developer … [Continue reading]

How to use colors in Excel 2010 VBA code

If you want to use colors in your VBA macros e.g. to modify cell background color or to change the font color, then you have two options on how to specify the colors: 1. By choosing from one of the preset EXCEL colors (56 colors). You do this by … [Continue reading]

How to create a custom font color or fill color in Excel 2010

To specify a custom font color or fill color in Excel 2010 follow these steps: 1. In the Home tab, Font group, click on the arrow next to the Fill Color icon. This will show the window with the theme colors. 2. At the bottom of the window, … [Continue reading]

Excel 2010: How to access worksheet built-in functions in VBA

VBA has got it is own set of functions which you can use in your code. You can extend this set of functions by using EXCEL built-in functions from within VBA. These functions will have the same syntax and parameters as in EXCEL itself. Here are some … [Continue reading]

Excel 2010 VBA objects: Handling cells and ranges

In previous posts of this series, we covered: Introduction. Handling workbooks. Handling worksheets. In this post we will talk about handling cells and ranges. A range can be a single cell or a group of cells. E.g. “A1” is a range … [Continue reading]

Excel 2010 VBA objects: Handling worksheets

In a previous post we discussed how to handle workbooks through VBA code. In this post we will go one step furher to deal with worksheets. To add a new worksheet: ActiveWorkbook.Worksheets.Add To activate a … [Continue reading]

Excel 2010 VBA objects: Handling workbooks

In a previous post I gave an introduction about VBA objects. In this post I will zoom a little bit into objects related to the workbooks. Remember that these posts are not intended to teach programming, but will rather give some highlights on the … [Continue reading]

Excel 2010 VBA objects : Introduction

Excel programming is handled through Visual Basic for Applications (VBA). VBA uses objects to get information from Excel or to perform certain actions. Simply put objects are the building blocks of the Excel application. Examples of … [Continue reading]

How to write a VBA macro in Excel 2010

If you know VBA (Visual Basic for Applications) programming then you can create your own VBA macros and run them from within Excel. To write a VBA macro, follow these steps: 1. On the Excel Ribbon click the Developer tab. If it is not in the … [Continue reading]