Excel VBA CodeTutorials

Remove Password from Excel Using VBA [Macros] Tutorial

3 Mins read

How to remove password from Excel using VBA as part of our continued effort to give the valuable resource of learning for Excel VBA Macros tutorial students.

If you are following our blogs on a regular basis then probably you have gone through the blog where Rishabh has very clearly shown to us that how to remove excel password without any software.

Now we will show you how to remove the password from Excel protected sheet using VBA. You cannot do anything on that sheet If your excel sheet is password protected. You can only view the content of that sheet or edit on that section where it is not locked. And if there are lots of formulas are used on that sheet then you are not able to see what formulas are used on that sheet.

That’s why you need to break or remove the password from an Excel sheet to edit or view the tricky formulas that are used in the sheet. Unlock password protected excel file online free. You can also learn Excel Macros Tutorial to know the below code

#1: “Excel VBA Code to” technique which can be applied using google search and customizing macro to quickly use ready-made codes with little knowledge of Excel’s programming language

In one of our earlier blogs, Rishabh has already has shown us how to remove the password. But here we will show you how to remove the password from the excel sheet using VBA. For example, you have an excel file that is password protected. Now if you want to write something in the sheet then you will get a message that the sheet is protected….


Now if you do not know the password then you are unable to edit anything in the excel sheet. Now to break the password of that excel we will take the help of VBA Password Remover.

Are you someone who spends days on collating data, making charts, and updating formulas and still feel like no one reads it anyway?

It isn’t actually the way that you think about this.

In our Excel Dashboard course and Excel Dashboard Blogs you’ll get to learn:

  • How to create amazing interactive Excel dashboards
  • How to update Dashboards in just a click of a Refresh Button and with a simple copy and paste of your new data into your spreadsheet

Here you’re going to learn a lot more about what is an Excel Dashboard and win your chance to wow your boss and take your career a notch higher.

How To Remove password from Excel WorkBook

  1. Press Alt + F11 to open VBA page
  2. Click on Insert – Module
  3. Copy the below VBA code and paste in the module
  4. Press F5 Button
  5. Save
Sub BreakPassword()

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

Exit Sub

End If

Next: Next: Next: Next: Next: Next

Next: Next: Next: Next: Next: Next

End Sub

(Code Source: instructables)

Now Press the run button or F5 to run the code to remove the protection from the excel sheet.



  • If VBA project is protected then you need to paste the code into the module
  • And if you don’t know the password of that VBA project then it is not possible to paste above code in the module.
  • Break the password of the VBA project to go ahead.

If you have tried every other technique including VBA code and didn’t find any of them useful, then try PassCue for Excel program that won’t disappoint you. It has the ability to force-brute crack the open password on Excel without knowing the password. And also can be able to remove Excel worksheet/workbook protection. It is a very simple software that provides a 100% password removal guarantee. To use this amazing software, you need to follow these simple steps.

Remove Password

How to remove password from Excel

  1. Open Excel Workbook
  2. Press Alt + F11 to open VBA page
  3. Click on Insert – Module
  4. Copy the below VBA code and paste in the module
  5. Press F5 Button
  6. Save

You had successfully removed the Excel password from Excel Workbook. You have Unlock password protected excel file online free.

Related posts

Alteryx Hotkeys - Alteryx Keyboard Shortcuts

2 Mins read
Top 50+ Alteryx Shortcuts for Windows. Alteryx is popularly known as a Self-Service Analytics tool. Business users can build their data workflows…

Step By Step Guide to Learn Alteryx

6 Mins read
Alteryx Learning Path: The growth in technology has resulted in growth in understanding. In today’s world, humans – fellow businessmen know the…
Excel VBA CodeTutorials

VBA Code to Clean the Date Format

1 Mins read
When it is useful? Most of the time the most annoying problem is when the data is taken from ERP or other…