A VBA Template for using CDXZipStream Functions

CDXZipStream, our Microsoft Excel add-in for ZIP code and location-based analysis, has a variety of functions that can be accessed within worksheet formulas.  These functions can obtain demographics data, create ZIP Code lists, identify locations within a radius, even calculate driving distances and optimize routes when used in conjunction with Microsoft MapPoint.  

CDXZipStream functionality can also be accessed through Visual Basic for Applications (VBA), and this approach is ideal when customizing or automating these functions to fit a particular need.  We’ve done some of this automation for you with our free downloadable templates;  just cut and paste address, ZIP code, or other data into a template, press a button, and you can geocode, calculate straight-line or driving distance to a target, find locations within a radius, etc.  

If you would like to customize these functions yourself, however, we’ve provided a number of resources to help you out.  Please check out our blog articles  Calling CDXZipStream with Visual Basic and Calling CDXZipStream with Visual Basic - Part II, which cover VBA code for Microsoft Excel.  VBA examples for Access are also covered in the article Calling CDXZipStream with Visual Basic in Microsoft Access.  

We also offer a free Excel template that provides VBA code for all CDXZipStream functions, and allows you to easily run, view, and copy the code you need for your particular application.  This provides a great first step for building your own customized template in Excel or Access.  Other advantages of using VBA are that it returns CDXZipstream data without using custom function formulas within worksheet cells, and in some cases it can be faster for large data sets, eliminating delays associated with recalculating worksheet formulas in Excel, for example.  The new template goes one step further, with stand-alone macros that return data to example worksheets.  Each worksheet contains input and output for each function, and you can easily copy the code from the template directly into your own VBA module.  The code can then be modified and adapted to your data set.   Here’s a short tutorial on how to use it:

Here is a link to the YouTube version: VBA Sample Code for Excel

You can download the template from the Technical Articles area of our links page.

Add comment

Loading