|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Private Sub CommandButton1_Click()
a = TextBox1.Text
For i = 1 To Len(a)
c = c & Asc(Mid(a, i, 1)) & "1"
Next
d = TextBox2.Text
If d = c Then
SaveSetting "ExcelMyApp1", "Startup", "b", "1"
nowday1 = 42859
SaveSetting "ExcelMyApp", "set", "day", nowday1
MsgBox "您已注册成功,感谢你的支持!"
Unload UserForm1
Exit Sub
Else
MsgBox "注册码错误"
Unload UserForm1
Stop
ThisWorkbook.Close
End If
End Sub
Private Sub CommandButton2_Click()
Unload UserForm1
Stop
ThisWorkbook.Close
End Sub
Private Sub UserForm_Initialize()
Dim 磁盘, 序列号
Set 磁盘 = GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf("Win32_LogicalDisk")
For Each mo In 磁盘
If mo.Name = "C:" Then
If mo.VolumeSerialNumber <> "" Then 序列号 = mo.VolumeSerialNumber
a = 序列号 & "lu"
End If
Next
TextBox1.Text = a
End Sub
|
|