Jumat, 29 Juni 2012

Re: [MS_AccessPros] Re: Function to generate a list of mixed characters

 

no need, I have one ...

'~~~~~~~~~~~~~~~~~~~~~~~~~

Function GetRandomString( _
   pNumChars As Integer _
   , Optional pStartWithLetter As Boolean = False _
   ) As String
'120629 Crystal

   'return a random string

   'SAMPLE USEAGE: GetRandomString(10,True)
  
   Dim sStr As String _
      , iPos As Integer
     
   sStr = GetRandomAlpha(Not pStartWithLetter)
  
   For iPos = 2 To pNumChars
      sStr = sStr & GetRandomAlpha(True)
   Next iPos
  
   GetRandomString = sStr
  
End Function

'~~~~~~~~~~~~~~~~~~~~~~~~~
Function GetRandomAlpha( _
   Optional pBooIncludeNumbers = False _
   ) As String
'110906 Crystal

   'return a random character
  
   Dim nASCII As Integer _
      , nMaxNumber As Integer
     
   If pBooIncludeNumbers Then
      nMaxNumber = 36
   Else
      nMaxNumber = 26
   End If
  
   Randomize
   nASCII = Int((nMaxNumber * Rnd) + 1)
  
   If nASCII <= 26 Then
      nASCII = 64 + nASCII
   Else
      nASCII = 47 + (nASCII - 26)
   End If
   GetRandomAlpha = Chr(nASCII)
  
End Function
'~~~~~~~~~~~~~~~~~~~~~~~~~

Warm Regards,
Crystal

 *
   (: have an awesome day :)
 *

________________________________
From: Bill Mosca <wrmosca@comcast.net>
To: MS_Access_Professionals@yahoogroups.com
Sent: Friday, June 29, 2012 9:43 AM
Subject: [MS_AccessPros] Re: Function to generate a list of mixed characters

D'Oh!

bill

--- In MS_Access_Professionals@yahoogroups.com, John Viescas <JohnV@...> wrote:
>
> Just remember YOU volunteered first, Bill.  <s>
>

>
> John
>

>
> From: MS_Access_Professionals@yahoogroups.com
> [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Bill Mosca
> Sent: Friday, June 29, 2012 4:28 PM
> To: MS_Access_Professionals@yahoogroups.com
> Subject: [MS_AccessPros] Re: Function to generate a list of mixed characters
>

>

>
> I wouldn't bother writing a function to do that. It would be cumbersome.
> Instead, get the freeware KeePass. It will do it for you.
>
> But if you really want a function to do it, one of us will be glad to write it
> for you.
>
> Regards,
> Bill Mosca, Founder - MS_Access_Professionals
> http://www.thatlldoit.com
> Microsoft Office Access MVP
> https://mvp.support.microsoft.com/profile/Bill.Mosca
>
> --- In MS_Access_Professionals@yahoogroups.com
> <mailto:MS_Access_Professionals%40yahoogroups.com> , "saigonf7q5"
> <saigonf7q5@> wrote:
> >
> > Some applications that I use need to change passwords often and regulary when
> logon. The password is restricted to 8 (no more no less) mixed characters
> included leters, numbers and special characters such as #, $... but can not
> begin with number. Often time, I have hard times to think of or to create a new
> password.
> >
> > I know there is a function to generate a list of random numbers. I have been
> wondering if there's a way or function to generate a list of character as I just
> described above, so it can be used as a list of choice of passwords.
> >
>
>
>
>
>
> [Non-text portions of this message have been removed]
>

------------------------------------

Yahoo! Groups Links

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar