Skip to content
Velkata edited this page Jan 4, 2012 · 3 revisions

A brief manual on how include Simple-VBA-functions into your automation excel project.

  1. Download the zip or tar.gz from GitHub: https://github.com/Velkata/Simple-VBA-functions/downloads.

github

  1. Open a new excel workbook.

start menu

  1. Use keys Alt+F11 on your keyboard to open the VBA Editor or you may use the developer tab --> Visual Basic editor icon.

open excel vb editor

  1. In the VBA editor go to menu --> File (Alt+F) --> Import File... --> select the downloaded libSimpleVBAFunc.bas

import module

import module

  1. A new module "Module1" should appear in the project browser.

vb project browser

  1. Select Module1 and go to menu --> View --> Properties Window

menu --> View --> Properties Window

  1. Then in the properties window rename the module from "Module1" to "SimpleVBAfunctions" for example.

Module1 SimpleVBAfunctions

  1. Insert a new module and rename it to "Main" for example.

Insert a new module "Main" rename it to "Main"

  1. You are ready to start using the functions from the Simple-VBA-functions. For a quick test a below code can be added to the Main sub and executed.

code to be added to the Main

Sub Main() Dim fLog fLog = NewLog() fLog = Log("Hello World!") End Sub

  1. The function NewLog() creates a new workbook sheet named "Log" with three columns "Date","Time" and "Log"

The function Log("Hello World!") appends the text "Hello World!" to the newly created log.

test finished

If you are interested in full excel reporting automation (by using Simple-VBA-functions library and Windows Task Scheduler) you may want to visit my this post:http://velin-georgiev-blog.appspot.com/?id=52001

Clone this wiki locally