devxlogo

Generate Random Strings

Generate Random Strings

This code helps test SQL functions or other string-manipulation routines so you can generate random strings. You can generate random-length strings with random characters and set ASCII bounds, both upper and lower:

 	Public Function RandomString(iLowerBoundAscii As _		Integer, iUpperBoundAscii As Integer, _		lLowerBoundLength As Long, _		lUpperBoundLength As Long) As String		Dim sHoldString As String		Dim lLength As Long		Dim lCount As Long		'Verify boundaries		If iLowerBoundAscii  255 Then iLowerBoundAscii = 255		If iUpperBoundAscii  255 Then iUpperBoundAscii = 255		If lLowerBoundLength 

devx-admin

Share the Post: