您现在的位置:阿里巴巴博客 > 凯泉钢铁
我的推荐
站长寄语   (2007-03-17 10:39:58)
我的图片 (共6张)
我的文章
EXCEL撤销工作表保护  (2009/03/18 08:54)

EXCEL工作表编辑资料,设置了工作表保护后,不能对表格进行插入删除操作。如果没有密码,很简单:工具-选项—工作表保护——撤消工作表保护 就可以了。如果忘记密码,如下操作: 1\打开文件
2\工具---宏----录制新宏---输入名字如:a
3\停止录制(这样得到一个空宏)
4\工具---宏----宏,选a,点编辑按钮
5\删除窗口中的所有字符(只有几个),替换为下面的内容:(复制下来)
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 / windows passwords and for multiple passwords
'
' Norman Harker and JE McGimpsey 27-Dec-2002 (Version 1.1)
' Modified 2003-Apr-04 by JEM: All msgs to constants, and
' eliminate one Exit Sub (Version 1.1.1)
' Reveals hashed passwords NOT original passwords
Const DBLSPACE As String = vbNewLine & vbNewLine
Const AUTHORS As String = DBLSPACE & vbNewLine & _
"Adapted from Bob McCormick base code by" & _
"Norman Harker and JE McGimpsey"
Const HEADER As String = "AllInternalPasswords User Message"
Const VERSION As String = DBLSPACE & "Version 1.1.1 2003-Apr-04"
Const REPBACK As String = DBLSPACE & "Please report failure " & _
"to the microsoft.public.excel.programming newsgroup."
Const ALLCLEAR As String = DBLSPACE & "The workbook should " & _
"now be free of all password protection, so make sure you:" & _
DBLSPACE & "SAVE IT NOW!" & DBLSPACE & "and also" & _
DBLSPACE & "BACKUP!, BACKUP!!, BACKUP!!!" & _
DBLSPACE & "Also, remember that the password was " & _
"put there for a reason. Don't stuff up crucial formulas " & _
"or data." & DBLSPACE & "Access and use of some data " & _
"may be an offense. If in doubt, don't."
Const MSGNOPWORDS1 As String = "There were no passwords on " & _
"sheets, or workbook structure or windows." & AUTHORS & VERSION
Const MSGNOPWORDS2 As String = "There was no protection to " & _
"workbook structure or windows." & DBLSPACE & _
"Proceeding to unprotect sheets." & AUTHORS & VERSION
Const MSGTAKETIME As String = "After pressing OK button this " & _
"will take some time." & DBLSPACE & "Amount of time " & _
"depends on how many different passwords, the " & _
"passwords, and your computer's specification." & DBLSPACE & _
"Just be patient! Make me a coffee!" & AUTHORS & VERSION
Const MSGPWORDFOUND1 As String = "You had a Worksheet " & _
"Structure or Windows Password set." & DBLSPACE & _
"The password found was: " & DBLSPACE & "$$" & DBLSPACE & _
"Note it down for potential future use in other workbooks by " & _
"the same person who set this password." & DBLSPACE & _
"Now to check and clear other passwords." & AUTHORS & VERSION
Const MSGPWORDFOUND2 As String = "You had a Worksheet " & _
"password set." & DBLSPACE & "The password found was: " & _
DBLSPACE & "$$" & DBLSPACE & "Note it down for potential " & _
"future use in other workbooks by same person who " & _
"set this password." & DBLSPACE & "Now to check and clear " & _
"other passwords." & AUTHORS & VERSION
Const MSGONLYONE As String = "Only structure / windows " & _
"protected with the password that was just found." & _
ALLCLEAR & AUTHORS & VERSION & REPBACK
Dim w1 As Worksheet, w2 As Worksheet
Dim i As Integer, j As Integer, k As Integer, l As Integer
Dim m As Integer, n As Integer, i1 As Integer, i2 As Integer
Dim i3 As Integer, i4 As Integer, i5 As Integer, i6 As Integer
Dim PWord1 As String
Dim ShTag As Boolean, WinTag As Boolean
Application.ScreenUpdating = False
With ActiveWorkbook
WinTag = .ProtectStructure Or .ProtectWindows
End With
ShTag = False
For Each w1 In Worksheets
ShTag = ShTag Or w1.ProtectContents
Next w1
If Not ShTag And Not WinTag Then
MsgBox MSGNOPWORDS1, vbInformation, HEADER
Exit Sub
End If
MsgBox MSGTAKETIME, vbInformation, HEADER
If Not WinTag Then
MsgBox MSGNOPWORDS2, vbInformation, HEADER
Else
On Error Resume Next
Do 'dummy do loop
For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66
For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126
With ActiveWorkbook
.Unprotect Chr(i) & Chr(j) & Chr(k) & _
Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _
Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
If .ProtectStructure = False And _
.ProtectWindows = False Then
PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _
Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
MsgBox Application.Substitute(MSGPWORDFOUND1, _
"$$", PWord1), vbInformation, HEADER
Exit Do 'Bypass all for...nexts
End If
End With
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next
Loop Until True
On Error GoTo 0
End If
If WinTag And Not ShTag Then
MsgBox MSGONLYONE, vbInformation, HEADER
Exit Sub
End If
On Error Resume Next
For Each w1 In Worksheets
'Attempt clearance with PWord1
w1.Unprotect PWord1
Next w1
On Error GoTo 0
ShTag = False
For Each w1 In Worksheets
'Checks for all clear ShTag triggered to 1 if not.
ShTag = ShTag Or w1.ProtectContents
Next w1
If ShTag Then
For Each w1 In Worksheets
With w1
If .ProtectContents Then
On Error Resume Next
Do 'Dummy do loop
For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66
For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126
.Unprotect Chr(i) & Chr(j) & Chr(k) & _
Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
If Not .ProtectContents Then
PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _
Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
MsgBox Application.Substitute(MSGPWORDFOUND2, _
"$$", PWord1), vbInformation, HEADER
'leverage finding Pword by trying on other sheets
For Each w2 In Worksheets
w2.Unprotect PWord1
Next w2
Exit Do 'Bypass all for...nexts
End If
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next
Loop Until True
On Error GoTo 0
End If
End With
Next w1
End If
MsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vbInformation, HEADER
End Sub
6\关闭编辑窗口
7\工具---宏-----宏,选AllInternalPasswords,运行,确定两次,等2分钟(确实有这么长时间),再确定.OK,没有密码了
国内著名花卉论坛  (2008/09/15 14:11)
摘要: http://bbs.mychg.org 藏花阁 http://www.tahua.net/踏花行 http://www.shanhua.org/山花浪漫 http://www.phpst.net溢彩花园论坛 http://www.whgbbs.com万花谷 http://www.mshua.net/陌上花 http://www.kanhua.net/index.php看...
如何成功的销售自己   (2008/04/09 11:59)
摘要: 销售是什么? 1.销售的概念   销售在日常生活中非常普遍,每个人脑海中都有销售的清晰画面。销售影响您的每一刻。本篇过后,关于销售的新认识有助于您开发和应用新的技能,并且取得最大的收获。   什么是销售呢?我们的定义很单纯。销售就是介绍商品提供的利益,以满足客户特定需求的过程。商品当然包括着有形的商品及服务,满足客户特定的需求是指客户特定的欲望被满足,或者客户特定的问题被解决。能...
摘要: 80%的销售来源于报价后第4至11次的跟踪 记得在欧洲工作的时候,我先前的美国老板对我说:嗨,伙计,做销售,你得学会跟踪。 为进一步说明问题,老板举了一个生动的实例:有个人看到我们的招聘广告,在应聘截止最后一天,他向我们投来他的简历(最后一天投简历的目的是使他的简历能放在一堆应聘材料的最上面)。一周后,他打电话来询问我们是否收到他的简历(当然是安全送达)。这就是跟踪。四天后,他来第二...




摘要: 80%的销售来源于第4至11次的跟踪!   记得95年在欧洲工作的时候,我先前的美国老板对我说:嗨,伙计,做销售,你得学会跟踪。   为进一步说明问题,老板举了一个生动的实例:有个人看到我们的招聘广告,在应聘截止最后一天,他向我们投来他的简历(最后一天投简历的目的是使他的简历能放在一堆应聘材料的最上面)。一周后,他打电话来询问我们是否收到他的简历(当然是安全送达)。这就是跟踪。四天后...

如何成为出色贸易人  (2007/07/31 09:13)
摘要: 网上有个朋友说,刚进入一家大公司,发现不能上网,也没有自己的邮箱,怎麽做贸易?     我觉得目前在中国最好的一批贸易人应该是15年前开始跟着台湾,香港贸易公司工作的这批人。现在大部分也都有自己的一片天。而近几年进入贸易圈的朋友,受到网上贸易的迷思,已经不具前人那样的功力,愿借此一文提出我给各位新进的建议,如果你们还是认为网上自有黄金屋,网上自有颜如玉,我保...





致辞  (2007/07/17 09:27)
摘要: 尊敬的朋友:您好! 非常高兴通过国际互联网向各位朋友介绍美丽的江阴。 江阴市是长江下游新兴的滨江港口城市和交通枢纽城市,是历史上著名的军事重镇和重要商港,素有“江海门户”、“锁航要塞”之称。全市下辖16个镇、1个省级开发区,总面积988平方公里,人口115万。先后获得了国家卫生城市、全国创建文明城市工作先进市、国家环境保护模范城市和全国...



无显示 无显示
博主信息
祝我的朋友们生意兴隆、财源广进、心想事成,牙齿天天晒太阳~~~~ :)
加关注
打个招呼
我的商铺
  • 访问量:128865
  • 文章数:123
  • 评论数:186
  • 创建日期:2005-11-10 12:48:43
RSS订阅
个人资料
最新博文
最新评论
最近访客
我的文章分类
最近更新博客
友情链接
·聊城蓝天钢管
编辑推荐