VBA Macro Code Examples

 

Here real VBA Macro code examples are available for downloading. All VBA Macro code examples are listed below. Browse the list or use the search function on the right hand side to find the right code!

 


 

 

Database connection, retrieve data from database, querying data into excel using VBA DAO

The VBA code makes a database connection and retrieves data by calling and giving input to existing database query.

Read more...
 

Determine If File or Directory Exists

The VBA Macro determines if a file or directory exists.

Read more...
 

Email Sender VBA Outlook

Email Sender VBA Outlook is an emailing program that sends emails by communicating with Microsoft Outlook.

Read more...
 

Extract, Get Data from MySQL PHP

This VBA Macro code extracts data from a MySQL Database and writes the data to an excel file. Many use this for large quantaties of data controll for PHP web development.

Read more...
 

Google Translate by Internet Explorer Automation

This VBA Macro Code translates text using Google Translate by automation of Internet Explorer controlled through Excel.

Read more...
 

Insert Image to Word, Resize Image, Insert Borders using VBA Excel

The program inserts an image to a word file and resizes the images and inserts a border.

Read more...
 

List Files In Directory

A simple program for listing all files in a certain directory by calling a VBA Macro Code.

Read more...
 

Make Excel Invisible and Hide Excel

The code makes excel invisible for 10 seconds and then excel will get visible again.

Read more...
 

Manual, Semi Automatic and Automatic Calculation or Call Calculation in VBA

A program for setting the calculation options or calling the calculation on demand.

Read more...
 

Open Close Save As Word File

This program opens a word file on a predefined location and saves the file with another name to another place.

Read more...
 

Read Text File Fetch Data

This code snippet reads a text file and fetches the data into the worksheet.

Read more...
 

Rnd Random Function

Rnd Random function is a short code snippet that shows how the useful Rnd Random function VBA macro is working.

Read more...
 

Stop and Wait While Executing VBA Code

This programs stops and waits for a few seconds in the middle of the execution of the VBA code.

Read more...
 

Sudoku Games Generator

Soduko Games Generator is a program that generates Sudoku games with chosen difficulty and complexity levels.

Read more...
 

Sudoku Solver

A professional tool to be able to solve complex sudoku games. The VBA program uses logic and guess functions to solve the game.

Read more...
 

Update MySQL database PHP

Updating existing data in a MySQL database is easily done by using this VBA Macro code. Many are using the methodology when working with websites developed in PHP and MySQL.

Read more...
 

VBA Error Handling On Error Resume Next

This macro code enables the On Error Resume Next function.

Read more...
 

VBA Message Box Yes or No MsgBox

Code for calling a message box with the option Yes or No and depending on the answer different coding is executed.

Read more...
 

Write Text to Word From Excel using VBA

This program opens a word file and writes text into it and customizes the text slightly.

Read more...
 

Write To MySQL database PHP

To be able to write data to a database and in this case a MySQL database is an efficient way of automating tasks that normally is very time consuming. This VBA Macro code writes new data to am existing MySQL database.

Read more...