メインコンテンツへスキップ

Excelで紛失したワークシート保護パスワードを回復する方法は?

重要なワークシートが他の人によって破壊されたり変更されたりしないように、常にパスワードを設定しています。 しかし、パスワードを忘れた場合、どうすればよいでしょうか。 幸い、Excelは、紛失したワークシート保護パスワードを回復するためのVBAコードをサポートしています。 この問題は次のように処理できます。

VBAコードを使用してExcelで失われたワークシート保護パスワードを回復する
ワークシートを保護するためのその他のチュートリアル...


VBAコードを使用してExcelで失われたワークシート保護パスワードを回復する

次のVBAコードは、ワークシートの元のパスワードをすばやくキャンセルするのに役立ちます。

1。 以前に保護されているワークシートを開きます。

2。 を押し続けます Alt + F11 キー、そしてそれは開きます Microsoft Visual Basic forApplicationsウィンドウ.

3に設定します。 OK をクリックします。 インセット > モジュール、次のコードをに貼り付けます モジュールウィンドウ.

VBAコード:失われたワークシート保護パスワードを回復する

Sub PasswordRecovery()
Dim i As Integer, j As Integer, k As Integer
Dim l As Integer, m As Integer, n As Integer
Dim i1 As Integer, i2 As Integer, i3 As Integer
Dim i4 As Integer, i5 As Integer, i6 As Integer
On Error Resume Next
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
ActiveSheet.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 ActiveSheet.ProtectContents = False Then
MsgBox "One usable password is " & Chr(i) & Chr(j) & _
Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _
Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
Exit Sub
End If
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next
End Sub

4。 次に、をクリックします F5 キーを押してこのコードを実行すると、プロンプトボックスが表示されます。 OK を閉じると、保護されたワークシートのパスワードがすぐにキャンセルされます。

注意:

1.このコードでは、一度にXNUMXつのワークシート保護パスワードのみを回復します。保護されたワークシートが複数ある場合は、このコードをXNUMXつずつ適用する必要があります。
2.上記のコードは http://excelzoom.com/2009/08/how-to-recover-lost-excel-passwords/.


Excelのパスワードを使用して、複数のワークシートを同時に簡単に保護します。

  ワークシートを保護する の有用性 Kutools for Excel 同じパスワードで複数のワークシートをまとめて保護するのに役立ちます。 また、これらのワークシートの保護を同時に解除するユーティリティも提供します。 今すぐKutoolsfor Excelの全機能を30日間無料でダウンロードしてください!


関連記事

Excelで一度に複数のワークシートを保護するにはどうすればよいですか?

Excelで一度に複数のワークシートの保護を解除するにはどうすればよいですか?

最高のオフィス生産性向上ツール

🤖 Kutools AI アシスタント: 以下に基づいてデータ分析に革命をもたらします。 インテリジェントな実行   |  コードを生成  |  カスタム数式の作成  |  データを分析してグラフを生成する  |  Kutools関数を呼び出す...
人気の機能: 重複を検索、強調表示、または識別する   |  空白行を削除する   |  データを失わずに列またはセルを結合する   |   数式なしのラウンド ...
スーパールックアップ: 複数の基準の VLookup    複数の値の VLookup  |   複数のシートにわたる VLookup   |   ファジールックアップ ....
詳細ドロップダウン リスト: ドロップダウンリストを素早く作成する   |  依存関係のドロップダウン リスト   |  複数選択のドロップダウンリスト ....
列マネージャー: 特定の数の列を追加する  |  列の移動  |  Toggle 非表示列の表示ステータス  |  範囲と列の比較 ...
注目の機能: グリッドフォーカス   |  デザインビュー   |   ビッグフォーミュラバー    ワークブックとシートマネージャー   |  リソースライブラリ (自動テキスト)   |  日付ピッカー   |  ワークシートを組み合わせる   |  セルの暗号化/復号化    リストごとにメールを送信する   |  スーパーフィルター   |   特殊フィルター (太字/斜体/取り消し線をフィルター...) ...
上位 15 のツールセット12 テキスト ツール (テキストを追加, 文字を削除する、...)   |   50+ チャート 種類 (ガントチャート、...)   |   40+ 実用的 (誕生日に基づいて年齢を計算する、...)   |   19 挿入 ツール (QRコードを挿入, パスから画像を挿入、...)   |   12 変換 ツール (数字から言葉へ, 通貨の換算、...)   |   7 マージ&スプリット ツール (高度な結合行, 分割セル、...)   |   ... もっと

Kutools for Excel で Excel スキルを強化し、これまでにない効率を体験してください。 Kutools for Excelは、生産性を向上させ、時間を節約するための300以上の高度な機能を提供します。  最も必要な機能を入手するにはここをクリックしてください...

説明


Officeタブは、タブ付きのインターフェイスをOfficeにもたらし、作​​業をはるかに簡単にします

  • Word、Excel、PowerPointでタブ付きの編集と読み取りを有効にする、パブリッシャー、アクセス、Visioおよびプロジェクト。
  • 新しいウィンドウではなく、同じウィンドウの新しいタブで複数のドキュメントを開いて作成します。
  • 生産性を 50% 向上させ、毎日何百回もマウス クリックを減らすことができます!
Comments (99)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
What is the Macro name?
This comment was minimized by the moderator on the site
Even using this code below, I continue to receive this message: (When I running that code on Excel 365, I got this message error:
Runtime '1004'
The password you supplied is not correct. Verify that the CAPS LOCK key is off and be sure to use the correct capitalization.
Please if you can help me on this.
thank you very much)
Sub PasswordRecovery()
Dim i As Integer, j As Integer, k As Integer
Dim l As Integer, m As Integer, n As Integer
Dim i1 As Integer, i2 As Integer, i3 As Integer
Dim i4 As Integer, i5 As Integer, i6 As Integer
On Error Resume Next
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
ActiveSheet.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 ActiveSheet.ProtectContents = False Then
MsgBox "One usable password is " & Chr(i) & Chr(j) & _
Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _
Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
Exit Sub
End If
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next
End Sub
This comment was minimized by the moderator on the site
Hello, Jose,
If the VBA code can't work well in Office 365, maybe the following article can help you, there are two methods in that article, please check it:
https://www.extendoffice.com/documents/excel/7179-excel-unprotect-all-sheets-without-password.html
Thank you!
This comment was minimized by the moderator on the site
When I running that code on Excel 365, I got this message error:
Run-time '1004'
The password you supplied is not correct. Verify that the CAPS LOCK key is off and be sure to use the correct capitalization.
Please if can help me on this.
thank you very much
This comment was minimized by the moderator on the site
The tip to recover my password says to open the Excel document. Without the password I cant open it, so how does this work?
This comment was minimized by the moderator on the site
Il existe de nombreux programmes pour récupérer le mot de passe des fichiers Excel. J'utilise Manyprog Excel Password Recovery. C'est rapide et facile à utiliser. https://fr.manyprog.com/excel-password-recovery.php
This comment was minimized by the moderator on the site
Hi. I've got Microsoft 365 . Does it work too ?I tried, but for now couldn't open my xlsx files..
This comment was minimized by the moderator on the site
Thank you! After saving it as an Excel 91-2003 (.xls) doc, I was able to use this to unlock all the worksheets within the workbook. Literally saved me so much time.
This comment was minimized by the moderator on the site
This does not appear to work. It only generates passwords with As, Bs and something else at the end. What am I missing?
This comment was minimized by the moderator on the site
This algorithm doesn't work. Only generates PWs with As, Bs and something different at the end. What am I missing?
This comment was minimized by the moderator on the site
Hay muchos programas para recuperar la contraseña de los archivos de Excel. Estoy usando Manyprog Excel Password Recovery. Es rápido y fácil de usar. https://es.manyprog.com/excel-password-recovery.php
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations