Excel VBA Resource List¶
Contents¶
- Frameworks
- Libraries
- Data Formats
- Data Structures
- Math libraries
- Database tools
- Userform tools
- Low level tools
- Parsers / Interpreters
- Web tools
- Developer tools
- Examples
- UI Ribbon
- UI Userforms
- Low level examples
- VBE UI
- AddIns
- Games / Fun projects
- External tools
- Style Guides
- Information
- Resources
- Websites
- Books
- Youtube
- Forums
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.
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.
CSV¶
- [๐][p_all][โญ][a_all] VBA-CSV-interface - Powerful, fast and comprehensive RFC-4180 compliant CSV/TSV/DSV data management library.
XML¶
- [๐][p_all][โญ][a_all] VBA-XML - XML conversion and parsing.
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
findArrayList
- As above. - [๐ผ][p_win][โญ][a_all] In
stdVBA
findstdArray
- As above. Also includes methods to search the array or perform checks from a callback.
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
findHashTable
- As above.
Math libraries¶
- [๐][p_all][โญ][a_all] VBA-Math-Objects - A matrix and vector library.
Database tools¶
- [๐ผ][p_win][โญ][a_all] SQL Library - An OOP SQL Library for psql, mssql, mysql databases.
Userform tools¶
- [๐ผ][p_win][โญ][a_all][๐บ][o_32] Task Dialog - A huge amount of UI functionality from this 1 class, in a strictly dynamic and modular way. Great for data input forms.
- [๐ผ][p_win][๐ ฐ๏ธ][a_ac] VBATaskDialog - A port of fafaline’s VB6 implementation.
- [๐ผ][p_win][โญ][a_all] Material UI - Make your userform feel modern with Material UI.
- [๐][p_all][โญ][a_all] Easy EventListener - Consolidate all event handling of a userform into 1 callback.
- [๐ผ][p_win][โญ][a_all] Pseudo Control Arrays - Optimal means of Consolidating all event handling of a userform. Demonstrates usage of
ConnectToConnectionPoint
API. Also worth looking at this class too. - [๐ผ][p_win][โญ][a_all]๐ฝ Modern UI Components - Custom modern looking controls.
- [๐ผ][p_win][โญ][a_all] MVVM - Model-View-ViewModel Infrastructure for maintainable userform development.
- [๐ผ][p_win][โญ][a_all] VBA Userform Transitions and Animations - An excellent library for implementing animation easings into the Userform.
- [๐ผ][p_win][โญ][a_all] Trick’s Timer - If you need to run a piece of code continuously and don’t have access to
Application.OnTime
(and/or you need to run it faster than once per second), this is the class for you! Also check out the forum post for more information. - [๐ผ][p_win][โญ][a_all] Drag and Drop filepaths - Allow your userform to handle drag-and-drop files.
- [๐ผ][p_win][โญ][a_all] Late-bound WebBrowser Control Events - A technique to latch onto WebBrowser events in a late-bound manner.
- [๐ผ][p_win][โญ][a_all]๐ฒ Mark’s userform tools - Numerous UI tools and pretty userforms.
- [๐ผ][p_win][โญ][a_all] VBA-UserForm-MouseScroll - Allows Mouse Wheel Scrolling on MSForms Controls and Userforms.
- [๐ผ][p_win][โญ][a_all] Custom Userform TitleBar color
- [๐ผ][p_win][โญ][a_all] Multi-color ListBox class
- [๐ผ][p_win][โญ][a_all] Use of GDIPlus in VBA - GDIPlus can be used to create a
canvas
like element where any image can be drawn to. Additionally check out this GDI32 class from the same author. - [๐ผ][p_win][โญ][a_all] Use of OpenGL in VBA - OpenGL is a cross-language, cross-platform application programming interface for rendering 2D and 3D vector graphics. In this article the authors of the GDIPlus class.
- [๐ผ][p_win][โญ][a_all][๐บ][o_32] VB6 Graph Control - Won’t work natively in VBA without a
PictureBox
compatible substitute, but an extremely performant graph control regardless.
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
andCDECL
. - From Frameworks:
- [๐ผ][p_win][โญ][a_all] In
stdVBA
findstdCOM
- A one stop shop for COM automation, from invoking interfaces by offsets to extracting type information.
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.
- From Frameworks:
- [๐ผ][p_win][โญ][a_all] In
stdVBA
findstdLambda
- 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 loosly based on the original CAsyncSocket wrapper in MFC.
Developer tools¶
- [๐ผ][p_win][โญ][a_all]๐ฃ 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][๐บ][o_32] - 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] 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]๐ฒ vbWatchDog -
vbWatchdog
hacks the vba runtime to provide module name, procedure name and line number where error occurred.
Examples¶
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¶
- [๐ผ][p_win][โญ][a_all] Drag and drop control - Dragging and dropping image controls around a userform.
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.
VBE UI¶
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
External tools¶
- [๐][p_all][โญ][a_all] oletools - Python tool which can be used to decode VBA P-Code (VBA’s intermediate language).
- [๐ผ][p_win]๐ฆ twinBasic - A VBA compatible parser, evaluator and compiler.
Style Guides¶
- RubberDuck’s style guide - Has some great intermediate - advanced guidance.
- VB6 Coding conventions - Variable/Class/Module naming conventions used in VBA. Greatly helps organisation in VBE (unless you have rubberduck).
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
andWith
. 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.
Resources¶
Websites¶
- Excel Development Platform Blog - Blog dealing with advanced topics/VBA.
- MSDN VBA Documentation
- MS-VBAL Language Spec
- Ron de Bruin - Simple-Intermediate topics.
- Bytecomb VBA Reference - Intermediate-advanced topics.
- Chip Pearson’s website - Great resource for beginners-intermediate.
- VBA for smarties - A great reference to numerous data structures and mechanics.
- ๐ฒAutomate Excel’s cheat sheets
- Rubberduck Blog - Intermediate-Advanced topics.
- MS KB Archive - Massive archive of vb6/vba problems, solutions and tutorials.
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.
- ๐ฒ 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
- ๐ฒ 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 - Youtube channel for Paul Kelly (MVP) - excelmacromastery.com.
- Sigma Coding - Large catalogue of tutorials - beginner through to advanced. Delves into interesting areas of VBA and it uses 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.
- ๐ฒ VBA A2Z - Many tutorials, some paid content. Good array of intereting 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.
- ๐ฒ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 - 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.
Backlinks:
list from [[Excel VBA Resource List]] AND -"Changelog"