What Is a Class?

Classes are Objects which allow you to group a set of related functionality into one group. Once you have defined your class, you instantiate an instance of a class in order to use it. Using classes leads to clean, understandable code. If you are a ‘class newbie’, you may want to first read Getting Started with Classes. Below are some of the classes implemented in the downloadable examples of this site.

 

List of a few of the custom classes referenced by this site

 

Classes: Introduction

Classes: Introduction

You use a class to describe an object. An object is a collection of whatever you like, and encapsulates both the values and references (properties) and actions (methods) associated with that object. You need to understand classes and objects to follow…
Data Manipulation Classes

Data Manipulation Classes

These classes provide the tools and data structures needed to separate your physical data in your spreadsheet, from how you process it in your procedures.  Notice that the row and column numbers begin at 1, and are relative to the start of the dataset …
cCell Class

cCell Class

  This class addresses and manipulates a single excel cell and its contents.  You can find the methods and properties documentation on github . The code is also below ‘gistThat@mcpher.com :do not modify this line – see ramblings.mcpher.com f…
cDataColumn

cDataColumn

Summary This is a column of cCell  . The rowId  argument refers to the row either by row name (where we have enabled labels ) or a row number. Where rowId  optional and omitted the complete column is operated on. Where rowId  is present the the c…
cDataRow

cDataRow

This is a row of cCell  . The sid  argument refers to the column either by column name or number. Where sid  optional and omitted the complete row is operated on. Where sid  is present the cCell  it addresses in the cDataRow  is operated on….
cDataSet

cDataSet

Summary This is a block of cCell   consisting of a collection of  cDataRow , with an abstraction of a collection of cDataColumn  The sid  argument refers to the column either by column name or number and the rowID  refers to the particular row by num…
CDataSets

CDataSets

  Summary   This is a collection of cDataSet You can find the methods and properties documentation on github . And the source code is here  
cHeadingRow

cHeadingRow

  Summary This is a special type of cDataRow  and is used for managing the column headers of a cDataSet You can find the methods and properties documentation on github . And the source code is on Gitbub or below ‘gistThat@mcpher.com :do n…
Copying and filtering worksheets and Excel tables

Copying and filtering worksheets and Excel tables

What can you learn here? Select worksheets to copy Choose selected columns  cDataSets filtering capability Copying partial tables between sheets Get the cDataset.xlm from here By now you are probably familiar with the …
Data Abstraction Example

Data Abstraction Example

Why abstract anyway? In a number of articles on this site and elsewhere, I have covered topics such as Getting data from Outlook Address Lists into Excel  , Serializing Excel data for input to any Google visualization , Excel Generate High Quality Road…

Get Data from Outlook

  How to get data into Excel from your outlook address book  get it now Here’s a common problem. You have a list of email addresses in Excel and you want to pick up various pieces of data from your contacts or global address list, matched on the e…
How to use cDataSet

How to use cDataSet

What can you learn here? Get Started with cDataSet Short code snippets Abbreviated explanations Quick examples Download the cDataSet.xlm. This is intended to be a fasttrack to get started with the Data Manipulation Classes…
cDataSet Model

cDataSet Model

What to download: All the examples contain all the classes needed for them to work and all projects can be found here . If you just want the main utility classes used throughout this site, in the downloads section cDataset.xlsm includes everything…
Clear data cells with cDataSet

Clear data cells with cDataSet

Hopefully you will have read How to use cDataSet to see how to abstract data from your sheet and taken a look at the cDataSet Model to see which methods and properties are available. I almost always use cDataSet when accessing sheet data from either…
How to make a table from a cdataset

How to make a table from a cdataset

From Excel 2003, you could use Tables. A cDataSet is somewhat like a table in that is structured data, expecting headings etc. When you use bigCommit() in cDataSet, it wipes out the existing Excel data and replaces it with the values you have changed….

Tables and listobjects

Nowadays structured references are the preferred way to access table data in Excel and VBA. Although most of the examples you may have looked at so far have talked about ranges, you can also specify table references to cDataSet – this allows you to mix…
Promises in VBA

Promises in VBA

Using promises in JavaScript and other languages is the preferred way to orchestrate the completion of asynchronous activities. Here’s a (not perfect but fun) Promise implementation in VBA. Example includes getting data from Google Fusion tables.
asynch ADO using promises

asynch ADO using promises

In Promises in VBA  I introduced how to use promises in VBA to orchestrate asynchronous activities. One of the things that you can do in VBA asynchronously is to get data from a workbook or a database using ADO . It’s very complex to orchestrate and e…
Complex aynchronous web services

Complex aynchronous web services

Here’s where it gets really interesting. Let’s say that we need to get some large number of spreadsheets from Google Docs. We want to do it asynchronously, and we also know that google docs will fail if it receives to many requests, or it’s too busy….
Exponential backoff with VBA promises

Exponential backoff with VBA promises

I posted something on how to do exponential backoff using jQuery promises  a while ago. At the time, I never thought I would be implementing that in VBA because of all the asynchroncity and callbacks needed, but since implementing a basic promises for …
SetTimer and VBA

SetTimer and VBA

You can use the Windows API to call setTimer() to do something a little like setTimeout in javaScript. However there are some serious gymnastics to be able to have multiple timers going at the same time. This is because setTimer can only callback a regular…
VBA promise implementation

VBA promise implementation

Here’s how the promise framework  is implemented. This is kind of extreme VBA and Excel is very unforgiving. If you are playing around with this, I advise saving often. cDeferred versus cPromise These two classes tend to be used interchangeably in some …

Learn about classes, Short code snippets, Abbreviated explanations Classes

cJobject

Enable the serialization and deserialization of Excel-JSON data

cShapeContainer 

a class representing a shape on a roadmap

cGoogleChartInput 

generate google visualization data and scripts from Excel data

cBrowser 

access and initiate browsing

cCookie 

store Excel data in a cookie

cGeneralObject

standardize the properties of Excel shapes and controls

cProgressTimer

 a countdown or progress timer that can use any excel shape

Sudoku classes

various classes used in the generation and solving of Sudoku puzzles

cChartContainer 

enable charting associated with roadmaps

cShapeTraceability

 embed JSON data genealogy data in roadmap shapes

cOutlookApp

Kick off Outlook session

cOutlookAddressBook

Populate Excel sheet with selected data from Outlook Address books

cRest

A library and classes to populate excel sheets from common restful queries

cADO

A library to execute SQL from Excel

cTagCloud

A class to automate making a tag Cloud in Excel

cStringChunker

Optimize string concatenation performance

Promises in VBA

An experimental implementation of deferred classes to enable asynchronicity in Excel

OAUTHO2 and VBA

A class to allow oauth2 authentication for VBA

Instrumenting VBA for Google Analytics

send signals to google analytics to track usage, timings and other events

parse.com api class for VBA

A wrapper API for the parse.com restAPI – a noSQL database for Excel

A VBA API for scriptDB

cScriptDB class