剛剛在網路上看到的,或許可以用的到。

Public Function getUserId(ByVal sSigninName As String) As Double
  Dim i As Integer
  For i = 1 To Len(sSigninName)
    getUserId = CToLong(getUserId * 101)
    getUserId = CToLong(getUserId + Asc(LCase(Mid$(sSigninName, i, 1))))
  Next i
End Function
Private Function CToLong(ByVal d As Double) As Double
  CToLong = d
  Do While CToLong > 2 ^ 32
    CToLong = CToLong - 2 ^ 32
  Loop
End Function
文章頁次2/2
首頁 « 12

訂閱網站

Copyright 2005 黯雲資訊小站 | Theme Sco v4.0 By:Scorpio