XLib is a free and open-source VBA function library that adds around 120 new function to VBA, making it much easier to create programs, scripts, and userforms for the Microsoft Office programs using the VBA programming language. Features of XLib include:
- MIT Licensed
- Free for commercial and personal use
- Works with Word, Excel, PowerPoint, Access, Outlook, and Publisher
- Lightweight (~60 KB in size)
- Zero dependencies
- Well Tested
- Virtually every single function in XLib has a test or multiple tests written for them to verify they work on various Office programs.
- No Downloads Needed
- Simply copy and paste the source code in a Module in your Office file and XLib will work.
- Zero dependencies and Late Bindings mean that if you add XLib as a module in your Office file, and send it to someone else, those functions will still work without the other user having to install or import anything.
- Cross Platform Support
- All functions work on Windows, and many functions will work on Office for Mac as well.
Sample XLib Functions
- Len2() ➔ Returns length of Strings, Arrays, Dictionaries, Collections, and any other objects that implement the property .Count, including Workbooks, Sheets, Worksheets, Ranges, Documents, Presentations, Slides, and many other Office Objects
- Sort() ➔ Sorts an array in ascending or descending order
- Large/Small() ➔ Same as the Large() and Small() functions in Excel, but can be used in Word, PowerPoint, etc.
- SubstrFind() ➔ Returns all characters between two substring
- IsInArray() ➔ Returns True if the value is found in an array
- Quarter() ➔ Returns the quarter of the year
- RandBetween() ➔ Same as Excel RandBetween(), but can be used in Word, PowerPoint, etc.
- RegexTest() ➔ Tests if the regex is found in a string
- Jsonify() ➔ Converts arrays into JSON format
- Http() ➔ Performs a web request and returns the response, with options to set headers, send post data, etc.
- ReadFile() ➔ To easily read files
- WriteFile() ➔ To easily write files
The MIT License (MIT)
Copyright © 2020 Anthony Mancini
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please feel free to check out my other projects or to get in touch with me. Some other VBA related projects I've made are:
X-VBA: A collection of tools for the Microsoft Office Suite and for the VBA programming language.
- XPlus: An Excel function library created entirely in VBA that includes over 100 useful functions.
- XTemplate: A VBA tool used to pull data from Excel into Word, PowerPoint, and Outlook files.
- XDocGen: A documentation generator for VBA code.
- XMinifier/XCombiner: A tool used to minify and combine VBA code.
Also feel free to get in touch with me at: firstname.lastname@example.org