Random String Generator in Visual Basic

Download
Download is available until [expire_date]
  • Version
  • Download 66
  • File Size 89.83 KB
  • File Count 1
  • Create Date March 2, 2016
  • Last Updated March 2, 2016

Random String Generator in Visual Basic

Random String Generator in Visual Basic

A tutorial and step by step tutorial on how to create random string generator in visual basic.

The download file contains the source code and a pdf format of the tutorial.

Sample code:

Const KEYS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890"
Dim slimit As Integer
Public Function Rand(ByVal Low As Long, _
                     ByVal High As Long) As Long
  Rand = Int((High - Low + 1) * Rnd) + Low
End Function
Private Sub ThemedButton1_Click()
For slimit = 1 To 1
Dim intCounter As Integer
    Dim strKey As String
    Dim intIndex As Integer 
    strKey = ""
    Randomize
    For intCounter = 1 To 8
        intIndex = Rand(1, Len(KEYS))
        strKey = strKey & Mid$(KEYS, intIndex, 1)
    Next
    votingcode.Text = strKey
  '  Addlist
   ' Command3_Click
Next
End Sub
, , , , ,

Post navigation

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.