说到加密,就连加密狗也给人家破解得彻彻底底,象广联达,外面的复制狗满天飞,我用的是免狗版。加密狗在这里是什么也检测不到的。这个程序只是对人家开发的宏程序进行一丁点的保护,如果要保护文档,直接启用密码好了。45楼的思路好,修改下更完善: Private Sub Workbook_Open() Dim fs, d, dc, s$ Set fs = CreateObject("Scripting.FileSystemObject") Set dc = fs.Drives For Each d In dc s = d.serialnumber Select Case s Case "1084165300" '硬盘序列
Set dc = Nothing Set fs = Nothing Exit Sub Case "1222130052" 'U盘序列
Set dc = Nothing Set fs = Nothing Exit Sub End Select Set dc = Nothing Next Set fs = Nothing MsgBox "找不到正确U盘,系统将退出!" ThisWorkbook.Close False End Sub
|