Public Function GetNewCode() As String Randomize Timer Dim NumPart As Long NumPart = Format(999999 * Rnd + 1, "000000") Dim StringPart As String * 2 StringPart = Chr$(Int(25 * Rnd) + 97) & Chr$(Int(25 * Rnd) + 97) GetNewCode = NumPart & StringPart End Function
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionPrivate Sub Command1_Click() Text1.text = GetNewCode End Sub