Posted to microsoft.public.excel.programming
|
|
Random gen
Public Function rndString$()
Const ALPHNUM = "abcdefghijklmnopqrstuvwxyz1234567890"
Dim pos%, i%, res$
For i% = 1 To 12
If i% < 6 Or Rnd() < 0.5 Then
pos% = 27 * Rnd() + 1
res$ = res$ & Mid$(ALPHNUM, pos%, 1)
End If
Next i%
rndString = res$
End Function
pauluk < wrote:
What i want is this
i want to generate a random word or name from
a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y, z,1,2,3,4,5,6,7,8,9,0,_
---
Message posted from http://www.ExcelForum.com/
|