Excel icon

Refreshing Pivot Tables

I have a certain workbook where I keep some statistics. I've created a small PivotTable, with a PivotChart attached to it. I like to have the chart update in real time, so I use a bit of code to do that. The following code goes in the sheet module for the particular sheet I want to update.

Continue Reading »

Automation iconVBA icon

Instantiating Office Applications

In Office – Applications – Started!, Ralf Stolzenburg posted sample VBA code for instantiating several Office applications. I've written about this subject as well, in Easy Application.Object References.

I like my code better, because it avoids the global Object variables present in Ralf's code. (Although as we'll see later, at least one global Boolean variable may be required.) I'd prefer to have one routine create (and return) the object, then pass it to another routine that does something else. It's all part of the encapsulation and loose coupling attitude I've mentioned elsewhere.

Continue Reading »

Outlook icon

Save all attachments from selected folder, continued

In Save all attachments from selected folder, I posted a method for scrubbing an Outlook mail folder of file attachments in order to reduce your network footprint (or make your PST file smaller).

A couple of commenters asked if there's a way to make sure the filename is unique. There are two ways (I know of) to accomplish this goal, and we'll explore both in this post.

Continue Reading »

Peltier Tech Charting Utilities for Excel