Using VBA to control Custom Lists

VBA Code Snippets

In Excel it is possible to create Custom Lists which are available for use in the spreadsheet or VBA application.  The default lists provided by Microsoft are the days of the week Monday – Sunday (or the shorter version of Mon-Sun) and the months of the year January – December (or the shorter version Jan-Dec). … Read more

Controlling Powerpoint from Excel using VBA

Controlling PowerPoint from Excel using VBA

So far in this series about using VBA to control other Office applications, we have looked at the basics of controlling other office applications and specifically how to create macros to control Word from within Excel.  Our approach for creating macros to control Word was using the Macro Recorder.  We record very short actions, copy … Read more

Do you have to use Dim to declare variables?

Do you have to use DIM

When looking at other people’s VBA code in books or on the internet we often see the Dim statement being used to declare variables.  It is possible to write valid VBA code without declaring variables, so why bother? The default settings for variables When variables are declared, they can be given a type.  Types include … Read more

Reading document properties with VBA

VBA Code Snippets

In the Windows Explorer it is possible to view a document’s properties.  Right-click on the file and select Properties. There is useful information in here, such as author, creation date, last saved date etc.  The good news is, we can access this information using VBA with  the BuiltinDocumentProperties Property. Not all document properties are populated … Read more

Edit links in Word using VBA

Edit link in Word using VBA

Last week we looked at linking Excel directly to Word documents.  This can create significant time saving as the Word document updates automatically whenever the Excel file changes.  The problem comes when we want to change the file path of the linked document, as it is necessary to change the links one by one.  But, … Read more

How to link Excel to Word

Linking Excel files to Word

A few weeks ago, I wrote a post about linking Excel files into PowerPoint. Whilst PowerPoint is probably the application I use most (after Excel of course), in third place would be Word. If, like me, you are regularly creating Word documents, or using standard templates, then learning how to link Excel to Word can … Read more