Queue Class for COM

What is a Queue Class?

A Queue data structure in programming is a first in, first out (FIFO) structure that stores data for a computer program in an ordered fashion. Data items can be placed in the Queue, pulled from the Queue, and the item in the front of the Queue is visible at any time. Unfortunately, but notably, Microsoft Visual Basic 6 (VB6), Microsoft Visual Basic for Applications (VBA), and other Microsoft COM (Component Object Model) languages do not provide the Queue data structure as a built-in feature in these languages. To fill this technology gap, ImagineThought.com has created the Queue Class for COM product for use with VB6, VBA, and other COM languages. To find out more about the Queue data structure, this Wikipedia article provides a really good and in-depth discussion of the Queue as it applies to programming languages.



Free Queue Class for COM, VBA, and VB6

Product Description:

The Queue Class for COM is the perfect solution to harnessing the power of the Queue data structure in your VBA, VB6, or other ActiveX COM code. The Queue Class for COM is primarily designed for use with Microsoft Office products, such as Microsoft Access and Excel, but will work with any development environment that supports linking to ActiveX COM DLLs. Once the QueueClass.dll file has been referenced by your code project, you will be able to create and use unlimited instances of the Queue data structure throughout your VBA, VB6, or other COM code. The Queue Class for COM is the perfect solution for those needing the Queue data structure, which is missing from VBA and VB6.

Product Versions of the Queue Class for COM:

There are three different versions available for the Queue Class for COM product: the Developer Edition, the Redistributable Edition, and the Site License Edition. Each of these versions provides a slightly different set of features and licensing models, and each of which is discussed in detail below.

  1. Queue Class for COM – Developer Edition

    The Developer Edition is the free version of the Queue Class for COM and is everything you need to start using an developing against this product. However, this version may contain pop-up messages, stating that it is the demo edition of the product. The Developer Edition of the Queue Class for COM can be downloaded for free from here.

  2. Queue Class for COM – Redistributable Edition

    The Redistributable Edition is the fully licensed version of the Queue Class for COM product and does not include any pop-up messages during use. The Redistributable Edition also provides a license for developers to royalty-free redistribution of this product with their products, so that it can be used by an unlimited number of users. The Redistributable Edition also provides an number of tools to make it easy to incorporate into your setup routines. Please contact us directly for more information about the Redistributable Edition of the Queue Class for COM.

  3. Queue Class for COM – Site License Edition

    The Site License Edition is everything included in the Queue Class for COM product Redistributable Edition, but also includes a full resale license for the Queue Class for COM product as well. Please contact us directly for more information about the Site License Edition of the Queue Class for COM.

How to Use the Queue Class:

To begin using the Queue Class for COM in your code, there are a couple of things that must be completed first, and may vary, depending upon the edition of the product that you have purchased. In general, the following steps will work to install and get the Queue Class for COM registered on your Windows machine.

  1. Downloading the Queue Class for COM

    The Developer Edition of the Queue Class for COM can be downloaded from this site, however, you must purchase the Redistributable Edition before that specific version can be downloaded. When downloading the file, be sure to save it to a location that you can remember and access easily, i.e. your Desktop for example. Once the file has been downloaded, you must unzip the file you downloaded. It will contain an MSI file to setup the Queue Class for COM on your computer. Once the have the Queue Class for COM MSI setup file, you will be ready to run the setup routine to setup the Queue class on your computer.

  2. Installing the Queue Class for COM

    To install the MSI setup file for the Queue Class for COM product, simply double click on the file from Windows Explorer. This will start the Setup Wizard, which will walk you through the installation process. Upon successful completion of the Setup Wizard, the Queue Class for COM product will be installed and registered on your machine and ready to be referenced from within your code projects.

  3. Referencing the Queue Class for COM DLL

    Once the Queue Class for COM product has been installed, it will automatically be registered as a COM object on the machine and will be visible to programs which support linking to COM. Microsoft Access is a good example of a program that can reference the Queue Class for COM DLL. To reference the Queue class in Access, complete the following steps:

    1. Start Access and open an existing, or create a new, database.
    2. Press ALT+F11 to open the Visual Basic Editor (VBE).
    3. In VBE, choose the References option from the Tools menu to open the References dialog.
    4. In the References dialog, scroll down and check the box next to the Queue Class for COM option.
    5. Then click OK on the References dialog. The reference should now be set correctly for your VBA project.

    The Queue class will now be referenced in the code project for the Access database and you may begin creating and using instances of the Queue class.

  4. Creating an Instance of the Queue Class

    Once the Queue class has been referenced in the code project, you may begin creating instances of the Queue class in code. The following code provides an example of creating a new instance of the Queue class.

    ' VBA/VB6 Code
    ' Declare a new instance of the Queue class
    Dim qMyQueue As New Queue

    In the preceding code example, the variable named qMyQueue is created as a new instance of the Queue class. Now that you have an instance of the Queue class, you can begin using it to store data values.

  5. Calling the Methods of the Queue Class from VBA code

    Finally, the last thing to do, once you have an instance of the Queue class, is to use it to store and retrieve data. The following code provides some examples of calling the methods of the Queue class.

    ' VBA/VB6 Code
    ' Declare a new instance of the Queue class
    Dim qMyQueue As New Queue

    ' Add the numeric value of 5 to the Queue
    qMyQueue.Enqueue(5)

    ' Peek at the front value in the Queue
    Dim vItem as Variant
    vItem = qMyQueue.Peek()

    ' Remove the front item from the Queue
    vItem = qMyQueue.Dequeue()

    ' Clearing the Queue
    qMyQueue.Clear()

    ' Getting the Count of the items on the Queue
    Dim lngQueueCount as Long
    lngQueueCount = qMyQueue.Count

    In the preceding code, each of the specific member methods and properties of the Queue Class for COM have a code example to show how they can be used in code. Working with the methods and properties of the Queue Class for COM is just that easy! For more information about the Queue Class for COM, or it’s methods and properties, please see the product manual, which is included with every edition of the product.

System Requirements:

  • The Queue Class for COM requires one of the following versions of Microsoft Windows: Windows 95/98/2000/NT/ME/XP/2003/Vista/7/8/8.1/10/11
  • The Queue Class for COM requires that any environment linking to the QueueClass.dll supports ActiveX COM.

These Tools are Designed For:

The Queue Class for COM is designed to work with the following products:

  1. Microsoft Office 95/97/2000/XP/2003/2007/2010/2013/2016/2019/2021/365
  2. Microsoft Visual Studio 6.0/.NET/2003/2005/2008/2010/2012/2015/2019/2022