网页点击按钮生成随机数字代码

2025-03-23 12:25:22
推荐回答(3个)
回答1:


回答2:


Function MakeStr(N As Integer) As String
Dim strS As String
strS = "abcdefghigklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
Randomize
For i = 1 To N
MakeStr = MakeStr & Mid(strS, Int(Len(strS) * Rnd + 1), 1)
Next
End Function

Private Sub Command1_Click()
Dim s as string
s=makestr(18)
Open "C:\a.txt" For output as #1
Print #1,s
Close #1
Print s
End Sub

回答3:

是用什么软件