Private alphas As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
For i As Integer = 0 To 100 Dim s As String = RndColName() Debug.WriteLine(s) Next
Private Function RndColName() As String Dim sb As New StringBuilder Dim rnd As New Random For i As Integer = 0 To 15 Dim s As Char = alphas(rnd.Next(0, alphas.Length)) sb.Append(s) Next Return sb End Function
When I step thru the code they don't duplicate like you see in the spoiler. But when I let it just run I get this craziness - any thoughts?