|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
可以编辑代码就可以了,运行下面的从原程序中抄出来的代码就可以一劳永逸了。
Public Sub A()
Set moc = GetObject("Winmgmts:").InstancesOf("Win32_DiskDrive")
For Each mo In moc
part_three = "TYV" & mo.Model & "QZ"
Next
Set driveid = CreateObject("scripting.filesystemobject")
part_one = "MXQ_SntQ" & driveid.GetDrive("c").SerialNumber & "aEd"
Set WMI = GetObject("winmgmts:")
part_two = "SDeE" & GetObject("winmgmts:").ExecQuery("Select ProcessorID From Win32_Processor")("Win32_Processor.DeviceID='CPU0'", 1).ProcessorId
pwd = Left(part_one, Len(part_one) - 14) & Right(part_one, 14) & part_three & part_two & "BBF8F0"
PPP = Replace(Replace(pwd, " ", ""), "GB", "WE")
Worksheets("jqmcc").Range("A" & CStr(Worksheets("jqmcc").Range("A" & CStr(Rows.Count)).End(xlUp).Row + 1)) = PPP
Worksheets("jqmcc").Range("B" & CStr(Worksheets("jqmcc").Range("A" & CStr(Rows.Count)).End(xlUp).Row)) = Format("2099-12-31 23:59:59", "yyyy-mm-dd hh:mm:ss")
Set moc = Nothing
Set drioveid = Nothing
Set WMI = Nothing
End Sub
|
|