Category Archives: Automation

Excel VBA, Export Worksheet to Blank Access Table

In this article I will explain how you can export values from an excel worksheet to a new blank Access table. – Step 1: The first step would be to connect to an existing access database or create a new access database. In this example we

No Thumbnail

VBA, Open Access Database From Excel

In this article I will explain how you can open an existing Access database from Excel using VBA. If you wish to only import the data into excel you could use the topic covered in the article below: Excel Connect To External Data (Access Database ) In

No Thumbnail

VBA, Excel Automation From Other Applications

In this article I will explain how you can automate an Excel workbook from another application. There are basically two methods for automation: Early binding Late binding I have explained the difference between these two methods when I was explaining about word automation: VBA, Automating

No Thumbnail

VBA, Write Excel Values to Word Document

In this article I will explain how you can write data from an excel workbook to a word document. The first step in doing this is to determine where the code is going to be written. There are 3 options: In the excel workbook In the

No Thumbnail

VBA Access Recordset, Object Library

If you are going to be working with the Recordset object in VBA for Access, there are 2 options. Early binding Late binding In the first method we add reference to the Access Object Library, before execution. It will run faster and we will have access to the VBA editor intellisense. On the other hand

Access VBA, Import Excel Worksheet to Blank Table

In this article I will explain how you can import values from an excel worksheet to a new blank table in Access using VBA. – DoCmd.TransferSpreadsheet: The values are imported using the DoCmd.TransferSpreadsheet Method: Syntax: Call DoCmd.TransferSpreadsheet(TransferType, SpreadSheetType, TableName, Filename, HasFieldNames, Range) TransferType: The type of transfer

No Thumbnail

VBA Access Create Table

In this article I will explain how you can create a table in an access database using VBA. The code below will create a table with the name “MyTable”: Sub Example() DoCmd.RunSQL (“Create Table MyTable”) End Sub  Result: Note: Attempting to create a table that already

No Thumbnail

VBA Word, Split Word File into Multiple Files (Every X Lines)

In the article below I’ve explained how you can use VBA for word to split a word document into multiple files every X pages: VBA Word, Split Word File into Multiple Files (Every X Pages) In this article I will explain how you can split the document