Freeware Random Number ActiveX Component

This is a simple and free ActiveX component for generating random integers and alpha-numeric strings. It can be used in ASP, VBScipt, Visual Basic, and any other programming language that supports ActiveX components.

Download Here

How to Use

Simply download the Zip distribution and unzip. Register the DLL using regsvr32.exe. The following sample VBScript is included in the download and demonstrates the functionality of this component:


' This VBScript example serves as the documentation for this free ActiveX component.
' To use the component, simply unzip the distribution package and register
' the DLL using regsvr32.

' Object creation:
set obj = CreateObject("Random.Random")

' Generate a random integer between 1 and 100 inclusive:
MsgBox "Random number between 1 and 100 = " & obj.Generate(1,100)

' Generate a N-character random alpha-numeric string using upper-case letters.
MsgBox "Random alpha-numeric string with 10 chars: " & obj.GenerateAlphNumString(10)

' Generate a N-character random alphabetic string using upper-case letters.
MsgBox "Random alpha string with 20 chars: " & obj.GenerateAlphaString(20)

' Generate a N-character random decimal string.
MsgBox "Random numeric string with 16 chars: " & obj.GenerateNumString(16)

' Generate a random 32-bit integer returned as a hex string.
MsgBox "Random 32-bit hex string: " & obj.Generate32BitHex()

' Generate a random 32-bit integer.
MsgBox "Random 32-bit integer " & obj.Generate32Bit()

' Set the random-number generator seed
obj.SetSeed 940128

About Tortuga

Tortuga Group LLC is in the business of building a new index for the World Wide Web at http://www.worldwideweb-x.com. The company has decided to make available some of its internally used ActiveX components to the general public. We hope you find them to be useful.

Copyright 2005 Tortuga Group LLC