ExcelHome技术论坛

 找回密码
 免费注册

QQ登录

只需一步,快速开始

快捷登录

搜索
EH技术汇-专业的职场技能充电站 妙哉!函数段子手趣味讲函数 Excel服务器-会Excel,做管理系统 Excel Home精品图文教程库
HR薪酬管理数字化实战 Excel 2021函数公式学习大典 Excel数据透视表实战秘技 打造核心竞争力的职场宝典
300集Office 2010微视频教程 数据工作者的案头书 免费直播课集锦 ExcelHome出品 - VBA代码宝免费下载
用ChatGPT与VBA一键搞定Excel WPS表格从入门到精通 Excel VBA经典代码实践指南
查看: 2357|回复: 4

求助:破解或如何找回VBA工程密码?

[复制链接]

TA的精华主题

TA的得分主题

发表于 2018-12-19 22:40 | 显示全部楼层 |阅读模式
本人忘记了附件的VBA工程密码,请问有大侠伸出援手破解或教我如何找回VBA工程密码吗?谢谢!

指标.rar

18.79 KB, 下载次数: 46

头像被屏蔽

TA的精华主题

TA的得分主题

发表于 2018-12-19 23:09 来自手机 | 显示全部楼层

TA的精华主题

TA的得分主题

发表于 2019-1-16 12:53 | 显示全部楼层
代码如下:
  1. Private Sub Workbook_Open()

  2. Sheets("Macro1").Visible = False


  3. End Sub

  4. Sub ddd()
  5. Dim sht As Object
  6. For Each sht In Sheets
  7. ThisWorkbook.Names.Add sht.Name & "!auto_activate", "=macro1!$a$2", False
  8. Next
  9. End Sub
  10. Sub 散点图加标签()

  11. '定义极值与交点
  12. If Sheets("data").Cells(2, 1).Value = "" Then
  13.         imsg = MsgBox("工具检测到-X轴最小值-没有设置,请确认是否设置相关值?", vbYesNo)
  14.                 If imsg = 6 Then
  15.                 MsgBox prompt:="请在左上角输入相应值!", Title:="请注意!"
  16.                 End
  17.                 End If
  18.                 If imsg = 7 Then
  19.                 MsgBox prompt:="将使用默认值-X轴最小值-", Buttons:=vbOKOnly, Title:="请注意!"
  20.                 tempxbottom = Sheets("data").Cells(3, 7).Value
  21.                 Sheets("data").Cells(2, 1).Value = Sheets("data").Cells(3, 7).Value
  22.                 End If
  23.     Else
  24.     tempxbottom = Sheets("data").Cells(2, 1).Value
  25.   End If
  26.   If Sheets("data").Cells(2, 2).Value = "" Then
  27.         imsg = MsgBox("工具检测到-X轴最大值-没有设置,请确认是否设置相关值?", vbYesNo)
  28.                 If imsg = 6 Then
  29.                 MsgBox prompt:="请在左上角输入相应值!", Title:="请注意!"
  30.                 End
  31.                 End If
  32.                 If imsg = 7 Then
  33.                 MsgBox prompt:="将使用默认值-X轴最大值-", Buttons:=vbOKOnly, Title:="请注意!"
  34.                 tempxup = Sheets("data").Cells(2, 7).Value
  35.                 Sheets("data").Cells(2, 2).Value = Sheets("data").Cells(2, 7).Value
  36.                 End If
  37.     Else
  38.     tempxup = Sheets("data").Cells(2, 2).Value
  39.   End If
  40.   If Sheets("data").Cells(2, 3).Value = "" Then
  41.         imsg = MsgBox("工具检测到-X轴交点-没有设置,请确认是否设置相关值?", vbYesNo)
  42.                 If imsg = 6 Then
  43.                 MsgBox prompt:="请在左上角输入相应值!", Title:="请注意!"
  44.                 End
  45.                 End If
  46.                 If imsg = 7 Then
  47.                 MsgBox prompt:="将使用默认值-X轴交点-", Buttons:=vbOKOnly, Title:="请注意!"
  48.                 tempxmiddle = Sheets("data").Cells(4, 7).Value
  49.                 Sheets("data").Cells(2, 3).Value = Sheets("data").Cells(4, 7).Value
  50.                 End If
  51.     Else
  52.     tempxmiddle = Sheets("data").Cells(2, 3).Value
  53.   End If
  54.   
  55.     If Sheets("data").Cells(4, 1).Value = "" Then
  56.         imsg = MsgBox("工具检测到-Y轴最小值-没有设置,请确认是否设置相关值?", vbYesNo)
  57.                 If imsg = 6 Then
  58.                 MsgBox prompt:="请在左上角输入相应值!", Title:="请注意!"
  59.                 End
  60.                 End If
  61.                 If imsg = 7 Then
  62.                 MsgBox prompt:="将使用默认值-Y轴最小值-", Buttons:=vbOKOnly, Title:="请注意!"
  63.                 tempybottom = Sheets("data").Cells(3, 8).Value
  64.                 Sheets("data").Cells(4, 1).Value = Sheets("data").Cells(3, 8).Value
  65.                 End If
  66.     Else
  67.     tempybottom = Sheets("data").Cells(4, 1).Value
  68.   End If
  69.   If Sheets("data").Cells(4, 2).Value = "" Then
  70.         imsg = MsgBox("工具检测到-Y轴最大值-没有设置,请确认是否设置相关值?", vbYesNo)
  71.                 If imsg = 6 Then
  72.                 MsgBox prompt:="请在左上角输入相应值!", Title:="请注意!"
  73.                 End
  74.                 End If
  75.                 If imsg = 7 Then
  76.                 MsgBox prompt:="将使用默认值-Y轴最大值-", Buttons:=vbOKOnly, Title:="请注意!"
  77.                 tempyup = Sheets("data").Cells(2, 8).Value
  78.                 Sheets("data").Cells(4, 2).Value = Sheets("data").Cells(2, 8).Value
  79.                 End If
  80.     Else
  81.     tempyup = Sheets("data").Cells(4, 2).Value
  82.   End If
  83.   If Sheets("data").Cells(4, 3).Value = "" Then
  84.         imsg = MsgBox("工具检测到-Y轴交点-没有设置,请确认是否设置相关值?", vbYesNo)
  85.                 If imsg = 6 Then
  86.                 MsgBox prompt:="请在左上角输入相应值!", Title:="请注意!"
  87.                 End
  88.                 End If
  89.                 If imsg = 7 Then
  90.                 MsgBox prompt:="将使用默认值-Y轴交点-", Buttons:=vbOKOnly, Title:="请注意!"
  91.                 tempymiddle = Sheets("data").Cells(4, 8).Value
  92.                 Sheets("data").Cells(4, 3).Value = Sheets("data").Cells(4, 8).Value
  93.                 End If
  94.     Else
  95.     tempymiddle = Sheets("data").Cells(4, 3).Value
  96.   End If
  97.       
  98. '扫描标签与XY值
  99.     tempcount = 0
  100.     For k = 1 To 500
  101.         kkk = 0
  102.         tempa = 0
  103.         tempb = 0
  104.         tempc = 0
  105.         If Sheets("data").Cells(6 + k - 1, 1).Value = "" Then
  106.         tempa = 100
  107.         End If
  108.         If Sheets("data").Cells(6 + k - 1, 2).Value = "" Then
  109.         tempb = 10
  110.         End If
  111.         If Sheets("data").Cells(6 + k - 1, 3).Value = "" Then
  112.         tempc = 1
  113.         End If
  114.         kkk = tempa + tempb + tempc
  115.             If kkk = 100 Then
  116.             MsgBox "标签中第" & (6 + k - 1) & "行为空值,请输入!"
  117.             End
  118.             End If
  119.             If kkk = 10 Then
  120.             MsgBox "X值中第" & (6 + k - 1) & "行为空值,请输入!"
  121.             End
  122.             End If
  123.             If kkk = 1 Then
  124.             MsgBox "Y值中第" & (6 + k - 1) & "行为空值,请输入!"
  125.             End
  126.             End If
  127.             If kkk = 11 Or kkk = 110 Or kkk = 101 Then
  128.             MsgBox "第" & (6 + k - 1) & "行有两个空值,请输入!"
  129.             End
  130.             End If
  131.          If kkk = 0 Then
  132.          tempcount = tempcount + 1
  133.          End If
  134.     Next
  135. '选择数据区域

  136.     Xvalue = "=data!R6C2:R" & 6 + tempcount - 1 & "C2"
  137.     Yvalue = "=data!R6C3:R" & 6 + tempcount - 1 & "C3"
  138.    
  139.    
  140.     ActiveSheet.ChartObjects("图表 1").Activate
  141.     ActiveChart.SeriesCollection(1).Select
  142.     ActiveChart.SeriesCollection(1).XValues = Xvalue
  143.     ActiveChart.SeriesCollection(1).Values = Yvalue
  144.     For k = 1 To tempcount
  145.     ActiveChart.SeriesCollection(1).DataLabels.Select
  146.     ActiveChart.SeriesCollection(1).Points(k).DataLabel.Select
  147.     Selection.Text = "=DATA!R" & 6 + k - 1 & "C1"
  148.     Next
  149.    
  150.     '
  151.     ActiveSheet.ChartObjects("图表 1").Activate
  152.     ActiveChart.Axes(xlValue).Select
  153.     With ActiveChart.Axes(xlCategory)
  154.         .MinimumScale = tempxbottom
  155.         .MaximumScale = tempxup
  156.         .MinorUnitIsAuto = True
  157.         .MajorUnitIsAuto = True
  158.         .Crosses = xlCustom
  159.         .CrossesAt = tempxmiddle
  160.         .ReversePlotOrder = False
  161.         .ScaleType = xlLinear
  162.         .DisplayUnit = xlNone
  163.     End With
  164.     ActiveChart.Axes(xlCategory).Select
  165.     With ActiveChart.Axes(xlValue)
  166.         .MinimumScale = tempybottom
  167.         .MaximumScale = tempyup
  168.         .MinorUnitIsAuto = True
  169.         .MajorUnit = 5
  170.         .Crosses = xlCustom
  171.         .CrossesAt = tempymiddle
  172.         .ReversePlotOrder = False
  173.         .ScaleType = xlLinear
  174.         .DisplayUnit = xlNone
  175.     End With
  176.    
  177. End Sub
复制代码


TA的精华主题

TA的得分主题

发表于 2019-7-18 13:06 | 显示全部楼层

TA的精华主题

TA的得分主题

发表于 2019-7-18 13:33 | 显示全部楼层
您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

关闭

最新热点上一条 /1 下一条

手机版|关于我们|联系我们|ExcelHome

GMT+8, 2024-4-20 05:12 , Processed in 0.048749 second(s), 11 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 1999-2023 Wooffice Inc.

沪公网安备 31011702000001号 沪ICP备11019229号-2

本论坛言论纯属发表者个人意见,任何违反国家相关法律的言论,本站将协助国家相关部门追究发言者责任!     本站特聘法律顾问:李志群律师

快速回复 返回顶部 返回列表