分享

破解VBA“工程不可查看”VB代码

 你喜欢那个 2011-08-19
破解VBA“工程不可查看”VB代码
2010-05-30 21:38
转载自 分享
最终编辑 ahanbin
Private Sub IC_Click()
Dim B     As Byte
Dim index As Double
Dim fso As FileSystemObject '要先添加引用“Microsoft Scripting Runtime”

dlg.ShowOpen
Filename = dlg.Filename

If Len(Filename) = 0 Then Exit Sub
Set fso = CreateObject("Scripting.FileSystemObject")

On Error Resume Next

fso.CopyFile Filename, Filename & ".bak", True

If Err.Number = 70 Then Tip.Text = "文件备份失败..."
Err.Clear

On Error GoTo 0

SetAttr Filename, 0
Open Filename For Binary As #1

DoEvents
index = 1

Do Until EOF(1)
       Get #1, index, B

       If B = 67 Then
         index = index + 1
         Get #1, index, B

         If B = 77 Then
            index = index + 1
            Get #1, index, B

            If B = 71 Then
                   Put #1, index + 1, 10
            End If
         End If

       Else
         index = index + 1
       End If

Loop

Close 1
Open Filename For Binary As #1
index = 1

Do Until EOF(1)
       Get #1, index, B

       If B = 68 Then
         index = index + 1
         Get #1, index, B

         If B = 80 Then
            index = index + 1
            Get #1, index, B

            If B = 66 Then
                   Put #1, index + 1, 10
            End If
         End If

       Else
         index = index + 1
       End If

Loop

Close 1
Open Filename For Binary As #1
index = 1

Do Until EOF(1)
       Get #1, index, B

       If B = 71 Then
         index = index + 1
         Get #1, index, B

         If B = 67 Then
            Put #1, index + 1, 10
         End If

       Else
         index = index + 1
       End If

Loop

Close 1

DoEvents
End Sub

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多