Giter Club home page Giter Club logo

vba-utilities's Introduction

VBA-utilities

VBA-utilities is a collection of helpful modules for programming in VBA. It is important to note, these modules are all programed using the Option Base 0 and Option Compare Text settings.

Modules

This section lists each of the modules along with a brief description of their purpose.

Arrays

The Arrays module contains various methods for manipulating arrays in VBA, e.g. copying and sorting. The Arrays module requires the IVariantComparator module be loaded. Useage example: an array A() can be sorted using the following method call

Arrays.sort A()

If using a custom IVariantComparator, the order of elements can be customized.

The Arrays.copyOf method produces a 1D copy of the entire original array, and the Arrays.copy method copies a subrange of the source array, src to the destination array, dest

Collections

The Collections module contains various methods for manipulating collections in VBA. Specifically, the module provides methods to check if a collection contains a specific element and also to retrieve its index, and to sort a collection (requires the Arrays and IVariantComparator modules to be loaded). For a collection col, the following is a list of example method calls:

Dim bVal1 As Boolean
bVal1 = Collections.contains("hello world", col)

Dim bVal2 As Boolean
bVal = Collections.hasKey(5, col)

Dim iVal As Long
iVal = Collections.indexOf("hello world", col)

The sort method for the Collections module

Collections.sort col

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.