Visual Basic for Applications Automation Library

13 Years ago I created a GitHub Repository with my personal Visual Basic for Applications (VBA) Automation Library and seems to still be used today.


I used for automation for most of my excel reports while I was working as Reporting Specialist. At this point all the functions are enclosed in a single libSimpleVBAFunc.bas file and they can be included to every automation project. The repository includes examples folder that contains very simple examples with the use of libSimpleVBAFunc.bas functions.


Link to the Repository: https://github.com/VelinGeorgiev/Simple-VBA-functions


Everyone is welcome to contribute to this repository!


What values could bring you this?

  1. Less time in coding
  2. Unified common functions that may make some macros easy to read.


I recommend you to take a look at the examples, because they can give you some good overview. If you are interested in full excel reporting automation take a look at using Simple-VBA-functions library and Windows Task Scheduler.


I have created below 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/VelinGeorgiev/Simple-VBA-functions

Github repository

2. Open a new excel workbook.

Windows Vista menu

3. Use keys Alt+F11 on your keyboard to open the VBA Editor or you may use the developer tab visual basic editor icon.


Empty excel sheet

4. In the VBA editor go to menu File(Alt+F) / Import File... select the downloaded libSimpleVBAFunc.bas


VBA editor
VBA editor

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


VBA editor

6. Select Module1 and go to menu "View" Properties Window

VBA editor

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

VBA editor
VBA editor

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


VBA editor
VBA editor

9. 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.


VBA editor with code

10. 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.


Excel sheet


Happy Automating!