Hi,

How do I randomize letters?

/ Ulf

Re: Randomize by Helmut

Helmut
Thu Aug 14 08:37:44 CDT 2003

Hi Ulf,
the following applies to capital letters A..Z
Dim i As Integer
Dim c As Integer
Randomize
For i = 1 To 200
c = Int((90 - 65 + 1) * Rnd + 65)
Debug.Print Chr$(c)
Next
Greetings from Bavaria, Germany
Helmut Weber
"red.sys" & chr$(64) & "t-online.de"


Re: Randomize by Ulf

Ulf
Fri Aug 15 00:52:29 CDT 2003

Hi Helmut,

What about letters not between A..Z, such as Swedish=20
letters - =C5=C4=D6.

/ Ulf


>-----Original Message-----
>Hi Ulf,
>the following applies to capital letters A..Z
>Dim i As Integer
>Dim c As Integer
> Randomize
> For i =3D 1 To 200
> c =3D Int((90 - 65 + 1) * Rnd + 65)
> Debug.Print Chr$(c)
> Next
>Greetings from Bavaria, Germany
>Helmut Weber
>"red.sys" & chr$(64) & "t-online.de"
>
>.
>

Re: Randomize by martinique

martinique
Sat Aug 16 02:02:27 CDT 2003

Create an array of all the characters you want to choose from: eg Chars(1 to
n).

Use Helmut's algorithm or something similar to get a random value (1 to n)
and use that as am index into your array:

C = Chars(Int(n * Rnd + 1))




"Ulf Nilsson" <ulfnil@swipnet.se> wrote in message
news:068001c362f1$697a50d0$a601280a@phx.gbl...
Hi Helmut,

What about letters not between A..Z, such as Swedish
letters - ÅÄÖ.

/ Ulf


>-----Original Message-----
>Hi Ulf,
>the following applies to capital letters A..Z
>Dim i As Integer
>Dim c As Integer
> Randomize
> For i = 1 To 200
> c = Int((90 - 65 + 1) * Rnd + 65)
> Debug.Print Chr$(c)
> Next
>Greetings from Bavaria, Germany
>Helmut Weber
>"red.sys" & chr$(64) & "t-online.de"
>
>.
>