在日常工作中,大家有时会遇到过这样的情况:使用Excel编制的报表.表格.程序等,在单元格中设置了公式.函数等,为了防止其他人修改您的设置或者防止您自己无意中修改,您可能会使用Excel的工作表保护功能,但时间久了保护密码容易忘记,这该怎么办?有时您从网上下载的Excel格式的小程序,您想修改,但是作者加了工作表保护密码,怎么办?您只要按照以下步骤操作,Excel工作表保护密码就会破解. 一,录制一个空白宏 二,编辑宏,替换以下代码 Public Sub 工作表保护密码破解() Const DB
新建excel 在右上角的ThisWorkbook右键插入模块复制下列CODE. Option Explicit Public Sub AllInternalPasswords()' Breaks worksheet and workbook structure passwords. Bob McCormick' probably originator of base code algorithm modified for coverage' of workbook structure / wi
动态数组使用: https://zhidao.baidu.com/question/1432222709706721499.html 使用Redim动态数组即可. 1 2 3 4 5 6 7 8 Sub test1() Dim a() As Integer, iRow As Long, i As Integer iRow = Cells(Rows.Count, 1).End(xlUp).Row ReDim a(iRow - 1) For i = 1 To UBou