VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Random file extension generator, or any number of chars to that. Not very sufisticated, but there y

by DGH (1 Submission)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 19th September 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Random file extension generator, or any number of chars to that. Not very sufisticated, but there you go, it got me out of a hole. If it helps

API Declarations


Dim AA,BB,CC

' Under form load put randomize this will read the time and make the result
' random

Rate Random file extension generator, or any number of chars to that. Not very sufisticated, but there y



   
   A = Int(Rnd * 61) + 1
   B = Int(Rnd * 61) + 1
   C = Int(Rnd * 61) + 1

If A = 0 Then
   A = A + Int(Rnd * 10)
   B = B + Int(Rnd * 10)
   C = C + Int(Rnd * 10)
End If
   
     AA = Mid("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", A, 1)
     BB = Mid("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", B, 1)
     CC = Mid("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", C, 1)

        NewFileExt = AA & BB & CC

End Function


Download this snippet    Add to My Saved Code

Random file extension generator, or any number of chars to that. Not very sufisticated, but there y Comments

No comments have been posted about Random file extension generator, or any number of chars to that. Not very sufisticated, but there y. Why not be the first to post a comment about Random file extension generator, or any number of chars to that. Not very sufisticated, but there y.

Post your comment

Subject:
Message:
0/1000 characters