Public Function s() As StringDim n As Byte, m As IntegerRandomizen = Int(Rnd * 3)RandomizeIf n = 0 Then s = Chr(Int(Rnd * 10 + 48))End IfIf n = 1 Then s = Chr(Int(Rnd * 25 + 97))End IfIf n = 2 Then s = Chr(Int(Rnd * 25 + 65))End IfEnd FunctionPrivate Sub Command1_Click()Dim str As String, i As Integerstr = ""For i = 1 To 6 str = str & sNext iText1.Text = strEnd Sub
//上面的是你写好到输入密码的地方,下面开始输入密码b = 0rem 输入密码If b<10 Then b = "00000" & bElse If b < 100 Then b = "0000" & b Else If b < 1000 Then b = "000" & b Else If b < 10000 Then b = "00" & b Else If b < 100000 Then b = "0" & b Else If b < 1000000 Then Else If b < 10000000 Then Goto 结束 End If End If End If End If End If End IfEnd IfSayString b//这里加入你确认密码和判断是否正确的语句b = b + 1Goto 输入密码Rem 结束