Giter Club home page Giter Club logo

awesome-vba's Introduction

Awesome VBA VBALogo Awesome

Visual Basic for Applications (VBA) is an implementation of Microsoft's event-driven programming language Visual Basic 6.0 (VB6) built into most desktop Microsoft Office applications.

This is a curated list of Libraries and Resources for both VBA and VB6.

Symbology

Because of the nature of VBA, many libraries do not work on all Operating Systems, in all Office Applications or in all architectures(x64/x86). Some libraries may also require external resources (DLL, Addins, etc.) which can be difficult to use due to VBA's lack of a package manager. To help you in finding projects suitable for your needs, this awesome list uses the following symbology. The symbology also has tooltips which may provide more information.

Platform Compatibility

  • p_all - Compatible on all platforms
  • p_mac - Mac compatible
  • p_win - Windows compatible

Application compatibility

  • a_all - All applications
  • a_wd - Word
  • a_xl - Excel
  • a_ac - Access
  • a_ol - Outlook
  • a_pp - PowerPoint
  • a_misc - Miscellaneous applications (MS Project, AutoCAD, etc.) - Specify in short description

Other important information

  • o_32 - 32-bit only
  • o_pass - Written in VBA but the code is password protected
  • o_dll - Requires external dependencies e.g. .dll, .ocx, .o, etc.
  • o_inst - Requires installation
  • o_paid - Link includes/leads to paid content

Contents


Frameworks

  • p_win a_all stdVBA - A framework containing numerous classes for automation and utility. Focuses on code compactness and long-term maintainability.
  • p_win a_all o_32 VbCorLib - A framework which brings many powerful .NET classes to VBA/VB6.
  • p_win a_all Hidennotare - A framework by Japanese author RelaxTools. Contains numerous classes, interfaces and forms.

Libraries

Data Formats

JSON

  • p_all a_all VBA-JSON - JSON conversion and parsing.
  • p_win a_all mdJSON - JSON library with dot-notation for extracting paths.
  • p_win a_all JSONBag - Uses shebang notation to extract keys from JSON strings. Can also build JSON with this library.
  • From Frameworks:
    • p_win a_all In stdVBA find stdJSON - As above.

CSV

  • p_all a_all VBA-CSV-interface - Powerful, fast and comprehensive RFC-4180 compliant CSV/TSV/DSV data management library.
  • From Frameworks:
    • p_win a_all In Hidennotare find csvWriter and csvReader.

XML

  • p_all a_all VBA-XML - XML conversion and parsing.

ZIP

Data Structures

Array-List

  • p_all a_all Better array - An array class providing features found in more modern languages.
  • From Frameworks:
    • p_win a_all o_32 In VbCorLib find ArrayList - As above.
    • p_win a_all In stdVBA find stdArray - As above. Also includes methods to search the array or perform checks from a callback.

Dictionary

  • p_all a_all VBA-FastDictionary - Fast, cross-platform, native Dictionary. Replacement for scripting dictionary.
  • p_all a_all VBA-Dictionary - A dictionary object which stores key-value pairs.
  • p_win a_all VBA-ExtendedDictionary - A dictionary object using Scripting.Dictionary but exposes some additional useful functionality.
  • p_all a_all cHashList - Simple, Fast and lightweight HashList class with no use of Win32 API. Requires string keys however.
  • p_win a_all CollectionEx - Extends the default VBA(/VB6) collection with methods to retrieve and check for key existence.
  • p_win a_all o_32 clsTrickHashTable - A hash table using machine code injected at runtime. Full replacement for scripting dictionary, with bonus features.
  • From Frameworks:
    • p_win a_all o_32 In VbCorLib find HashTable - As above.

Math libraries

  • p_all a_all VBA-Math-Objects - A matrix and vector library.
  • p_all a_all VBA Float - An utility to perform computations over big integers and rational numbers with thousands digits.

Database tools

  • p_win a_all SQL Library - An OOP SQL Library for psql, mssql, mysql databases.

Userform tools

Low level tools

  • p_all a_all VBA-MemoryTools - Provides an ultra-fast, copy memory alternative.
  • p_win a_all Safe Subclassing - Provides the ability to subclass Excel/Word/PowerPoint window or Userforms to perform further automation. In the later threads there is also an example for subclassing other windows from other applications.
  • p_win a_all Calling private module functions
  • p_win a_all o_32 Universal DLL Calls - A library which can be used to call functions of any function pointer, DLL or object in both STDCALL and CDECL.
  • p_all a_all VBA state-loss callback - A crash free detector for VBA state-loss. State loss can occur when: Someone clicks end in an unhandled error; You click the VBA stop button; You enter design mode; Application exits.
  • p_win a_all vb2clr - Use C# from VBA using the .NET CLR runtime.
  • From Frameworks:
    • p_win a_all In stdVBA find stdCOM - A one stop shop for COM automation, from invoking interfaces by offsets to extracting type information.
    • p_win a_all In stdVBA find stdReg - Registry automation from searching to setting values.

Parsers / Interpreters

  • p_win a_all VbPeg - A parser generator for VBA. Converts PEG grammar like this into VBA code like this. Very useful if your implementing a new programming language in VBA. Wqweto has also included some math expression parsers as tests.
  • p_all a_all Volpi's Math Expression Parser - A fast math expression parser. Doesn't allow calls to objects, no callstack.
  • p_all a_all VBA Expressions - A powerful string expression evaluator focussed on mathematics and data processing.
  • p_win a_all ClooWrapperVBA - Execute OpenCL from VBA, using either the GPU or CPU.
  • From Frameworks:
    • p_win a_all In stdVBA find stdLambda - Full programming language including object manipulation, call stack, etc.

Web tools

  • p_all a_all VBA-Web - Connect VBA, Excel, Access, and Office for Windows and Mac to web services and the web
  • p_all a_all VBA-WebSocket - Microsoft example code for a WebSocket client which can be used in conjunction with an echo server. There is also a class and an async version built by the discoverer of the microsoft code.
  • p_win a_all o_32 vbAsyncSocket - Simple and thin WinSock API wrappers for VB6 loosely based on the original CAsyncSocket wrapper in MFC.
  • p_win a_all Edge Automation - Automate Chromium Edge using devtools protocol. Github backup here
  • p_win a_all Chrome Automation (via devtools protocol) - Automate Chrome using chrome devtools protocol.
  • p_win a_xl webxcel - A webserver which runs a RESTful backend. The creator also made an article on how it works on dev.to.

Developer tools

  • p_win a_all o_inst Rubberduck - An open-source COM add-in project that integrates with the Visual Basic Editor to add modern-day features to the familiar IDE. Works in VBA6, VBA7.x (x86/x64), and yes, in VB6 too!
  • p_win a_xl VBA-IDE-Code-Export - Addin contains a code importer and exporter for use with git (or any VCS).
  • p_win a_xl a_wd o_pass - RibbonX - AndyPope's Visual Ribbon Editor.
  • p_win a_xl Custom UI XML Editor - Addin for directly adding, editing and validating ribbon XML (Excel 2010+).
  • p_win a_all o_paid MZ-Tools - VBE addin providing development tools
  • p_win a_all VbPeg - A parser generator for VBA. Converts PEG grammar like this into VBA code like this. Very useful if you're implementing a new programming language in VBA.
  • p_win a_all VBA Resource File Editor - Store other files inside your excel/word/powerpoint files for later use with this handy tool.
  • p_win a_all o_32 vbRichClient - An external client full of useful libraries
  • p_win a_all o_paid vbWatchDog - vbWatchdog hacks the VBA runtime to provide module name, procedure name and line number where error occurred.

Miscellaneous

  • p_all a_all Excel Name Manager - A treeview control replacement by JKP and Peter Thornton coded entirely in VBA.
  • p_all a_all Excel Flex Find - A treeview control replacement by JKP and Peter Thornton coded entirely in VBA.

Examples

Algorithms, code optimisation, and performance testing

  • VBSpeed - The Visual Basic Performance Site - focus on VB6 but transferrable across to VBA.

UI Ribbon

  • Ron de Bruin - Ribbons/QAT - A leading resource for information/samples on developing custom ribbons and context menus.
  • Office MSO Icons - Ribbon icons can often use one of the 1500 (3 pages on this site) MSO icons wich pre-exist in Office applications.

UI Userforms

Low level examples

  • p_win a_all Iterating the ROT - An example of iterating the ROT to find Excel Workbook instances.
  • p_win a_all Iterating Excel Instances via IAccessible - In some cases Excel instances aren't registered to the ROT. The Excel application however implements IAccessible, which not only can be used to automate the UI, but can also be used to obtain the Excel Instance from a hwnd.

AddIns

  • p_win a_xl MenuRighter - MenuRighter is an Excel addin that lets you modify right-click menus. You can add almost any control found in other right-click menus or Excel 2003's "classic" menus.
  • p_win a_xl Sam Rad's DatePicker - Visually impressive and professional DatePicker addin for Excel. Worksheet only / cannot be used with userforms.

Games / Fun projects

  • p_win a_xl xlStudio - A DAW for Microsoft Excel. Also check out the awesome video.
  • p_win a_xl Cellivization - A cool RTS-like game created in Excel. Also check out the awesome video.
  • p_win a_xl Arkanoid - Arkanoid, a retro arcade game, built in Excel. On some machines it runs faster than others.
  • p_win a_xl Battleships
  • p_win a_ac Pacman
  • p_win a_xl ExcelCommodroid - Commodore computer loader using MS Excel on Windows. VBA7 only.

External tools

  • p_all a_all oletools - Python tool which can be used to decode VBA P-Code (VBA's intermediate language).
  • p_win a_misc twinBasic - A VBA compatible parser, evaluator and compiler.
  • p_all a_all vscode-vba - Extension that adds VBA editor support to Visual Studio Code.

Style Guides

Information

  • Thunder - The birth of Visual Basic - A little article about the birth of VB7/VBA.
  • My First Bill Gates Review - Joel Spolsky, program manager for the Excel team, recounts his first Bill Gates review. Joel got numerous features added e.g. IDispatch, Variant, For each and With. It also discusses the dreaded Date bug ported to Excel from Lotus 123.
  • Ruby, EB and DLL composition - Translated copy of VBStreets article created by Russian VBer Хакер. Details the composition of the VB6 and VBA dlls in amongst the history of the language.
  • PCode Internals - VBA is compiled to PCode. Understanding the lower level P-Code is a topic of heavy interest and research.
  • How many lines of code in EB - Untranlated article by Russian VBer Хакер which estimates the number of lines of code in VB6/VBA.
  • SAFEARRAYS - The internal structure of arrays.
  • Articles by Sancarn - Various articles written by Sancarn about VBA including, performance, actual issues with VBA etc.

Resources

Win32 API Resources

  • JKP API Declarations
  • Microsoft Office Code Compatibility Inspector - The Microsoft Office Code Compatibility Inspector was designed by Microsoft to troubleshoot compatibility issues with VBA code as when upgrading Office from 32-bit to 64-bit. MS has not maintained a link to the software for download from its servers, though versions of it are apparently available on the internet.

VB6 / VBScript

  • Planet Source Code - The original Github before Github was Github. Now available on Github. Possibly not the entire collection (?) of projects/source code that was previously available at the PSC website, though certainly more than enough for more people, and plenty to keep yourself amused on a Friday evening.
  • vbAccelerator Archive - archived copy of vbAccelerator site (articles, source code, etc.) that disappeared in 2015, reappeared in 2018, and anyone's guess what's going to next... Primarily VB6, but useful VBA resource.

Websites

Books

  • Hard Core Visual Basic - An advanced programmer's guide to the new 5.0 version of Visual Basic. Includes a core set of utilities, shortcuts, and solutions to problems to achieve a wide range of functional programs. A hard book also exists. Also check out the Comments and corrections.
  • The VBA Developer's Handbook - Write bulletproof VBA code for any situation. This book is the essential resource for developers working with any of the more than 300 products that employ the "Visual Basic for Applications" programming language. Hardbacks also available elsewhere.
  • Advanced Visual Basic 6 - Power Techniques for Everyday Programs Matthew Curland. Hardbacks also available elsewhere.
  • Professional Excel Development - In this book, four world-class Microsoft® Excel developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. Hardbacks also available.
  • o_paid Excel VBA Programming For Dummies - It′s time to move to the next level—creating your own, customized Excel 2010 solutions using Visual Basic for Applications (VBA).Using step–by–step instruction and the accessible, friendly For Dummies style, this practical book shows you how to use VBA, write macros, customize your Excel apps to look and work the way you want, avoid errors, and more
  • o_paid Power Programming with VBA - Excel 2019 Power Programming with VBA is fully updated to cover all the latest tools and tricks of Excel 2019. Encompassing an analysis of Excel application development and a complete introduction to Visual Basic for Applications (VBA), this comprehensive book presents all of the techniques you need to develop both large and small Excel applications.
  • (E-Book) VBA beginners
  • (E-Book) Excel VBA beginners

YouTube

  • Excel Macro Mastery - Paul Kelly (MVP) - excelmacromastery.com.
  • Sigma Coding - Large catalogue of tutorials - beginner through to advanced. Delves into interesting areas of VBA not explored by other content creators.
  • WiseOwl's VBA tutorials - Great all-round resource for VBA. Perfect introduction for beginners. In-depth lessons into all aspects of VBA. Huge playlist that covers most types of VBA.
  • o_paid VBA A2Z - Many tutorials, some paid content. Good array of interesting and different topics - in-depth tutorials into different parts of VBA, with some .NET/VSTO videos. Strong focus on UI development.
  • Excel VBA Is Fun
  • Excel for Freelancers - Hands-on tutorials to developing specific applications from beginning through to end. All levels.
  • Leila Gharani - Office-wide focus - useful for beginners.
  • o_paid Get to know VBA - Some great applications presented and created with VBA.

Forums

  • Reddit - Daily VBA Q&A. Occasional Pro-Tip sharing and Show & Tell library publishing.
  • StackOverflow - A great place to ask questions. Duplicate questions are flagged as duplicates and send the author to the correct place.
  • Chandoo - Forum for the Chandoo - the blog of Purna Duggirala (MVP). Very active.
  • Visual Basic Discord - A chat room for VB.NET/VBA/VB6 fanatics.
  • Excel Discord - Discord server moderated by Tim Heng (Excel MVP) with focus on helping Excel users.
  • MrExcel - Mostly Excel generic, but a lot of VBA content can be found here also.
  • Excel Forum
  • a_ol Slipstick - Excellent forum for the Slipstick website (Outlook VBA) of Diane Poremsky (MVP). Diane is quick to respond, and her answers are extremely helpful.
  • VBForums - Office Development - Forum with focus on VB6/.NET with VBA section.

Contributing

Your contributions are always welcome! Please take a look at the contribution guidelines first.

awesome-vba's People

Contributors

cristianbuse avatar decimalturn avatar kallunwillock avatar sancarn avatar serkonda7 avatar ws-garcia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

awesome-vba's Issues

TaskDialog 64bit

Very nice list, a lot of neat projects here I hadn't seen before.

Since you included one of mine, I thought I'd put in a note that you should remove the "32bit only" icon for TaskDialog, as I've now updated the VB6 project page to include the 1.3.8 Universal version, now that all features are available in VBA64 and I've updated the VB6 demo form to work with it. Project is also on GitHub now. The class works in VB6, VBA6, VBA7 32bit, VBA7 64bit, twinBASIC 32bit, and twinBASIC 64bit.

Section of office scripts for Office365?

Since Office365 web versions only support Office Scripts and since web-downloaded files do not execute macros by default, more and more people are trying to use Office Scripts for automations.

Are there any plans to add a section for these Office Scripts in the future?

Chilkat ActiveX Libraries

After reddit user techjp indicated that it might be awesome enough. As a result we added it to:

Frameworks:

* [🖼][p_win][][a_all][💲](# "Some modules free; Some require $299+ license")[👽](# "Requires external dll") [Chilkat AXL](https://www.chilkatsoft.com/refdoc/activex.asp) - Numerous useful ActiveX libraries hosted from a single zip.

WebTools:

* From Frameworks
    * In `Chilkat AXL` find `HTTP`, `HTTPRequest`, `HTTPResponse`, `Auth*`, `OAuth*`, `REST`, `WebSocket` and numerous other useful web-related libraries.

This evening Kallum and I have been taking a look at it and we aren't certain it is awesome, so would like to put it to a vote. 5 votes and we will re-add it. I've added my vote to take into consideration techjps suggestion.

Reasons for removal:

The library does not follow any constructor naming conventions e.g. loadXYZ.

'Typical name convention
With new ChilkatCsv 
  .LoadFile(...)
End With

'Looks okay and expected
With ChilkatJson
  .LoadString(...)
End with

'would have prefered LoadFile... but ok
With new ChilkatXml
  .LoadXMLFile(...)   
End Wit

'Convention not followed
With new ChilkatGzip
  .ReadFile(...)
End With

'Convention not followed
With new ChilkatHttp
  .PostJson(...)
End With

It is important for a framework to remain internally consistent, as this will reduce the learning curve of the library. This is especially important when

Very few examples

Again difficult to learn what is correct to do without good and full examples.

Poor error checking(?)

In order to get a feeling for the library I tried to parse a csv and set the column "c" to the sum of "a" and "b". This code didn't error, but it didn't modify the csv either... I'm a little unsure whether I'm doing the right thing or not, but the lack of errors sure don't help.

Sub t()
  Dim x As New Chilkat_v9_5_0.ChilkatCsv
  Call x.LoadFile("C:\Users\sancarn\Desktop\tbd\chilkatax-9.5.0-x64\_test.csv")
  
  Dim i As Long: i = 1
  For i = 1 To x.NumRows
    Call x.SetCellByName(i, "c", x.GetCellByName(i, "a") + x.GetCellByName(i, "b"))
  Next
  
  Call x.SaveFile("C:\Users\sancarn\Desktop\tbd\chilkatax-9.5.0-x64\_test.csv")
End Sub

Missed sections in TOC

There are sections of the document that do not appear in the table of contents, such as the Parsers/Interpreters section that was available in earlier versions of Awesome-vba.

Tooltips on icons

I think it's quite cool you are building a list like this and BTW thanks for linking to one of my repositories.

I think it would be useful to have tooltips on top of the icons so that new visitors don't have to scroll up and see the meaning of icons in case they don't want to remember them.

For example instead of:
👑
you could use this:
[👑](# "Compatible on all platforms")
which looks like this:
👑

I think here it actually shows up as a link but in the main Readme.md it does not.

VBA style guides

Removed both:

Currently these standards don't feel robust or thorough enough, and thus we don't feel they are "Awesome". Needs more work before adding to the list. See ruby style guide for an example of a full style guide.

Shall we credit directly?

E.G.

[🖼][p_win][][a_all][🏺][o_32][👤](# "LaVolpe") [Universal DLL Calls](http://www.vbforums.com/showthread.php?781595-VB6-Call-Functions-By-Pointer-(Universall-DLL-Calls)) - A library which can be used to call functions of any function pointer, DLL or object in both `STDCALL` and `CDECL`. 

In ways I feel this would be a nice shout-out to authors of work?

But alternatively it could get political too... (Who was first? etc.)

Suggest adding 🔗 emoji to document early-bound references?

I find myself avoiding early-bound references where possible, mainly because of their version instability. Is this something others would be interested in?

We'd be talking about references other than VBE7.dll, Excel.exe, stdole2.tlb, MSO.dll, FM20.dll ofc

E.G. If a library requires an early-bound reference to Scripting.Dictionary and VBScript.Regexp then we'd have the following:

* [🖼][p_win][⭐️][a_all][🔗](# "Scripting.Dictionary;VBScript.Regexp") SomeVBALibrary - Does something

However libraries which create Late-bound objects like:

set rx = CreateObject("VBScript.Regexp")

wouldn't have to include the emoji

Awesome list preperation

PR Requirements

PR Title: "Add VBA"
PR addition: "VBA/VB6 - Visual Basic for Applications (VBA) is an implementation of Microsoft's event-driven programming language Visual Basic 6.0 (VB6) built into most desktop Microsoft Office applications"

*Add to bottom of category, (not alphabetical order)

Author requirements

Requirments

  • Has been around for at least 30 days.
  • Don't open a Draft / WIP pull request while you work on the guidelines. A pull request should be 100% ready and should adhere to all the guidelines when you open it. Instead use #2242 for incubation visibility.
  • Run awesome-lint on your list and fix the reported issues. If there are false-positives or things that cannot/shouldn't be fixed, please report it.
  • The default branch should be named main, not master.
  • Includes a succinct description of the project/theme at the top of the readme. (Example)
  • It's the result of hard work and the best I could possibly produce. If you have not put in considerable effort into your list, your pull request will be immediately closed.
  • The repo name of your list should be in lowercase slug format: awesome-name-of-list.
  • The heading title of your list should be in title case format: # Awesome Name of List
  • Non-generated Markdown file in a GitHub repo.
  • The repo should have awesome-list & awesome as GitHub topics. I encourage you to add more relevant topics.
  • Not a duplicate. Please search for existing submissions.
  • Only has awesome items. Awesome lists are curations of the best, not everything.
  • [N/A] Does not contain items that are unmaintained, has archived repo, deprecated, or missing docs. If you really need to include such items, they should be in a separate Markdown file
  • Includes a project logo/illustration whenever possible
  • Entries have a description, unless the title is descriptive enough by itself. It rarely is though
  • Includes the Awesome badge
  • Has a Table of Contents section
  • Has an appropriate license >> (CC4)
  • Has contribution guidelines >> (https://github.com/sancarn/awesome-vba/blob/main/Contributing.md)
  • [N/A] All non-important but necessary content (like extra copyright notices, hyperlinks to sources, pointers to expansive content, etc) should be grouped in a Footnotes section at the bottom of the readme. The section should not be present in the Table of Contents >> (Feel symbology needs to sit at the top as it's 100% required and needs to be known to understand the document)
  • Has consistent formatting and proper spelling/grammar
  • Doesn't use hard-wrapping
  • Doesn't include a Travis badge; You can still use Travis for list linting, but the badge has no value in the readme.
  • Doesn't include an Inspired by awesome-foo or Inspired by the Awesome project kinda link at the top of the readme. The Awesome badge is enough

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.