Function randnumber()
    '随机加字母大小写,加的位数不一样,2-6位
    Dim temprnd, temprnd2 As String
    Dim temprndnum As Long
    temprnd2 = ""
    temprndnum = Int((4 * Rnd) + 2) '随机数
    For i = 1 To temprndnum
        If Int(Rnd() * 2) = 0 Then
            temprnd = Chr(Int(Rnd() * 26) + 65) '大写英文字母
        Else
            temprnd = Chr(Int(Rnd() * 26) + 97) '小写英文字母
        End If
       randnumber = randnumber + temprnd
    Next i
End Function

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-04
  • 2022-12-23
  • 2022-12-23
  • 2022-01-03
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
  • 2022-12-23
  • 2018-01-22
相关资源
相似解决方案