打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
破解VBA“工程不可查看”VB代码
破解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

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
VBA文件夹遍历
Excel各种密码解锁姿势(收藏备用)
Word VBA 遍历文件夹内所有文本文件,批量做出修改。
VBA文件及文件夹操作
vb建立删除文件
如何使用VBA删除工作簿中的空白表
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服