0
剛剛在網路上看到的,或許可以用的到。
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.0