Close Window

Unprotect Cells In A Worksheet When I Have Forgotten The Password

I have created a worksheet some time ago and protected certain cell within it
and gave the worksheet a password in order to edit it. Unfortunately I can
no longer remember the password and to save me creating the worksheet again
it would be better if there was a way round this or a small program that will
remove the password for me. Your help is appreciated.

Free Excel Courses

Similar Excel Tutorials

I'll show you how to lock a spreadsheet so that nothing can be changed in it. This is a great feature to use when ...

How to allow only certain people to edit certain cells or ranges in Excel. This is a security feature that you can ...

How to keep an Excel workbook safe by encrypting it with a password. This will make it so that a user cannot open t ...

How to password protect VBA code and macros in Excel so that a user cannot see the code or edit it or do anything ...

Helpful Excel Macros

- This will allow you to protect or unprotct all worksheets in a workbook at once. It doesn't allow you to input a passwor

- This macro will hide all formulas within a workbook and not allow them to be deleted. The page will not be protected li

- This Excel Macro allows you to save a specific worksheet within the Excel Workbook to its own new file. You will be a

- This Excel Macro saves the currently visible worksheet into the SAME folder as the current file. It is different from

- Excel macro that will remove/delete all of the comments from an entire Excel workbook. This means that this macro will

Similar Topics

We have a large (4,000+ rows) excel worksheet from a prior employee that I
would like to be able to use, but it is password protected and no one has the
password. Is there a way to copy or save it as a different file that will
not copy the password protection? It would save me a couple days of work if
it is possible.


I need to open a password protected workbook using VBA.

I've tried the code below but I still get prompted for a password.


Workbooks.Open Filename:="\\HOME\Working\Report.xls" _
, Password:="xxxx"

How do I get it to open automatically???

Corporate edict.

I have a worksheet that is locked and protected now, except for cells in a certain collumn. I have named the cells in that column "MS96A".

If a user enters a date in a cell or range of cells anywhere in the column, the changed cells also need to be locked and protected (Once they enter a date, it is not allowed EVER to be changed again. Corporate requirement! *Shrug*).

What I am looking for is this. If the user selects that cell again, they will get the usual pop-up message, "The cell or chart that you are trying to change is protected..."

I think I am close, but I am getting an "End If without block If" error on the If Clause.

Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim MRange As Range
Set MRange = Range("MS96A")
' If Not Intersect(Target, MRange) Is Nothing Then For Each cell In MRange Sheets("Sheet1").Unprotect Password:="temp"
cell.Interior.ColorIndex = 3
cell.Font.Color = vbBlack
Selection.Locked = True
Selection.FormulaHidden = False
Next cell
ActiveSheet.Protect Password:="temp", _
DrawingObjects:=False, _
Contents:=True, _
ActiveSheet.EnableSelection = xlUnlockedCells
End Sub

I have found similar posts on the forum, but nothing without use of a userform.

I have the following code:


Sub Development()
 Pass = InputBox("Please enter development password", "Password")
 If Pass = "XYZ" Then
 Else: MsgBox ("Password incorrect, please try again")
 End If
End Sub

This works, but I want to hide the text as it is entered.
Is there a way I can enter this as a property? i.e. = ... or something?? I've tried what seems intuitive, but nothing works.


Hey guys,

I have an excel file that is password protected. I have opened it as read-only.. Is there any way to unlock it & do it modifiable when I already opened it as read only (of course without having to close it & re-open it and enter password lol)


Is there a way to lets say go to and automatically have VBA fill in the user name and password ? I am trying to automate login for my co workers to a certain site. Just havent been able to find out how. PLZ HELP !!

Thnx for your help man. Now I have another situation.

I have the following:

1. Login form containing username and password fields.
2. Data entry form

I want to do the following:

1. Coding for username and password fields, which, If the login is successful, takes me to DATA Entry Form, Otherwise shows message "Invalid Login".

Thanks in anticipation.

I'm trying to use VBA to go to a website that requires a User Name, Password, and a Submit Button.

So far I can get everything to work besides the Submit part. The code runs without errors, but doesn't actually "hit" the submit button on the webpage.

For posting, I removed my actual user name and password and and used the generic " User Name " and " Password " highlighted in blue.

I highlighted another section in green that I took from a previous post hoping it would solve my problem. The link is: /

Here is the code I am using:

Sub GoToWebSiteAndPlayAroundNew()

Dim appIE As Object ' InternetExplorer.Application
Dim URL As String

Set appIE = CreateObject("InternetExplorer.Application")
URL = " / "

With appIE
.navigate URL
.Visible = True

Do While .busy: DoEvents: Loop
Do While .ReadyState 4: DoEvents: Loop

.document.getelementbyid("fUserName").Value = " UserName "
.document.getelementbyid("fPassword").Value = " Password "

End With

On Error Resume Next
x = 0
For Each mitem In IE.document.all
mitem.Value = "x"
x = x + 1

x = 0
For Each mitem In IE.document.all
If x = "Submit" Then
Exit For
End If


End Sub

I have protected a worksheet as it has several formulae on that I do not wat anyone else to mistakingly delete. I then have spent time on setting up a sheet to track changes (just in case this has any bearing on the problem). This is the only thing that I think I have changed since protecting this morning and now I cannot unprotect the sheet. I have not protected the workbook and the unprotect sheet function is now greyed out.

Any ideas?

Also, I cannot move the Pivot Table from the new Worksheet it is created in, to my existing Worksheet.

I am running Excel 2011 for Mac.

I have a Worksheet with a small amount of data, and when I click the Pivot Table button it automatically creates the Pivot Table in a new Worksheet. The Pivot Table data is fine, but I want it to display alongside the source data.
I've tried using the Move Pivot Table option and choosing to Create Pivot Table in Existing Worksheet and choosing a source cell alongside my current data, but nothing appears. Also, I checked in Edit menu and found that the Pivot Table appears to have not even been created/moved because there is no option to undo it.

Appreciate any help, let me know if you have any further questions.


I have an excel worksheet that adds two other worksheets in a data
triangle. I copied it to create a new data set and used find &
replace to change the worksheet references to the new ones.

The cells still contain the result of the old formula referring to the
previous worksheets. The only way I can get the formula to return the
correct result is to edit (F2) each cell and press enter. Calc now
(F9) does nothing.

I've seen this before, but this time, I need to calculate many
thousands of cells and don't have time for this workaround.

Any ideas?


Don S

How do I grant only specific people to be able to open, view, edit an excel file? I don't want anybody else besides these two people to be able to even open the file, so I'm not talking about password protecting to prohibit editing a file. I would assume I need to go to the properties, security settings but I'm not sure?

I have workbook in which I want to save a specific worksheet to a new file with only the values saved - all data in this worksheet are references to cells on another worksheet, which is using VLOOKUP to pull data from a database.

Found the following code and it gets me close, but it copies the cell references, not the values. It also allows me to specify the file name from a cell reference.

I want the new workbook file to simply be saved, not opened, and a message box to display stating where the file was saved (will always be in the same location on the LAN).

What modifications do I make to this to get this to work per above requirements?

Sub CopyMe()
Dim SaveMeAs As String
SaveMeAs = Sheets("Sheet1").Range("B2").Text
ActiveWorkbook.SaveAs Filename:="C:\My Documents\" & SaveMeAs
End Sub

Can anyone help me with creating a macro that will save the worksheet as a pdf in a specific folder with the value of a cell and the date. This is what I have so far.

ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=Range("H10").Value & Format(Date, "mmdd")

This saves it as the correct cell value + the date, but it saves it to my documents. I need it to save to a shared folder on a network drive.

Any help would be greatly appreciated.

Hi can someone help please?

I have two worksheets and wish to copy rows from worksheet 1 to worksheet 2 if a condition is met in one of the cells within that row.

Hope that makes sense.


Hi everyone....this is my first post here ....and not my last I believe!

My question I believe is easily solvable for you cracks of excel.
I have a worksheet with a list of rows (item#, date, price, etc). In the last column of this list I can put an x for some of the items.
On another worksheet or sheet, I need to autoamtically have a list of the items in the first list above, that have an X in the last columns.
I created an example on a worksheet attached just for you to understand.
I apreciate all the help I can get.
Thank you so much.

I have a couple of worksheets that have goal seek already performed on 20 target cells (for each worksheet). I did this manually, without a macro (since I'm absolutely horrible at all of this).

Now from what I can tell, I need a code to add to the worksheet module in order to make sure that the goal seek updates itself whenever I change a value in the formula of the target cell.

what IS that code?! I can't understand the codes some people have put up, so I have no idea what to do.

Target Cell: M21:M42
Changing Cells: N21: N42

We have a workbook that does not allow us to use the Move or Copy command. When we right click on the worksheet and select Move or Copy, we are able to check the box to make a copy, but when we click OK nothing happens.

We have checked to make sure that the workbook and worksheet:
1. Are not protected
2. That there are no hidden worksheets
3. That there are not worksheets that exist with the same name
4. That not all the worksheets are selected

There are only two worksheets in this workbook.

Any ideas of why we are unable to make a copy of this worksheet within the same workbook or to another workbook?

Hi all.

I have set up a workbook that is sent out to lots of different users. They each keep and use their own copy.

I have set it up so that everything looks OK and is visible on MY screen, but I'm conscious that some users may have different screen sizes, different toolbars set up, and so on, which might make some parts not immediately visible to them.

I have set up an auto-execute macro which automatically sets the zoom factor to best fit, for several of the worksheets, and this works fine.
Here's the code that does it.

 ActiveWindow.Zoom = True

By repeating this code for each worksheet, I can make each one be zoomed just right.

However, the file contains 8 sheets that are all identically laid out, except the number of rows is different.
What I want to do is go to the worksheet that has the largest number of rows (it's always the same worksheet, so I know which one it is), set the zoom factor for THAT worksheet (which I can do, and it always has the same number of rows), and then take THAT zoom factor, whatever it is - and it will vary depending on the user - and apply that to the other worksheets that have a similar layout.

I could just go through each worksheet and zoom it automatically, but that would mean that some of the sheets looked very large, others very small, and I'd like them to have a consistent appearance.
I could also specify a range on each worksheet that was similar to the appropriate range on the longest worksheet, and zoom that automatically, but that's not ideal either, because some of the row heights vary from sheet to sheet, and again I'll end up with different font sizes.

Anyone know how to do this ?

I have a Workbook with 2 sheets, the first one is the data entry and the second one contains all the calculations and confidential info.
I have one staff member that does the data entry but I don't want them to see the 2nd sheet. I know I can hide the sheet then protect the entire workbook which does work, but is there an easier way so that the second person doesn't have to keep hiding/unhiding the 2nd sheet?
It would be perfect if when you tried to click on Sheet2, it asked for a password.

I'm going over a worksheet (prepared by someone else) where I can't see the text that has been typed in the worksheet within the cells. I can see it in the editing bar, but not in the actual cell. It doesn't appear to have anything to do with the color of the text... suggestions?

Hi was wondering if anyone can help.

I am trying to reference a cell on another worksheet, the cell is formatted to be a date. when i put in the following formula =Sheet2!A1 and i don't input a date into A1 on sheet 2 the cell containing the formula shows the date 00/01/1900, is there any way of stopping this showing, ideally the cell would be blank until I inputted a date into A1 on sheet 2

Any help would be very much appreciated

Some time ago I created a spreadsheet and greyed out the areas that weren't needed. Now I need to expand the spreadsheet and use more columns. Trouble is I've forgotten how to unhide those columns. I didn't write any macros and usings the right-click unhide method is proven futile. The sheet isn't protected which is puzzling since I can't get the mouse to even highlight any of the greyed out areas.

Any suggestions would be fantastic!

I recently moved into a new office and I am using a brand new computer on our network. When trying to edit an existing file, I'm not able to select a single cell and type. After clicking on a cell, if I move the mouse at all (even without pressing the left button) it just continues highlighting cells no matter where I move the mouse. I am also not able to click on the tool bars at all. I have to actually Ctrl-Alt_del to get out of the program. I'm sure this is something simple, but I don't know that much about this program. Any help would be greatly appreciated.

Okay, so I tried (for hours) to find a solution to this and have finally gotten frustrated to the point where i think asking here will be my best bet.

Basically I want to export data from excel worksheets to various places on a word document I had. I have created a word template as well as bookmarks for that template, as that seems to be the recommendation for performing such a task with excel.

My problem is ... Now what?

I basically have 1 constant worksheet that contains all my affiliates info (Name, Address etc), which i'd like to use to populate some bookmarks in my word template, and then i have another worksheet for the previous month, indicating sales etc for that affiliate. I intend on adding a new worksheet every month that i would use to create new invoices.

Furthermore, i'd really like to be able to update a new file (or perhaps a new page on the same file) for each company with the use of a button, similar to the one's you'd see in an access form.

Can anyone help? Let me know if you need me to clarify.



Related pages

create payslipsvba reference sheet by nameconvert 15 minutes to millisecondshow to assign macro to button in excelxlsm extensionnper formula excelenhanced meta filemail merge in excel 2003stones to kilos conversion tablemarkup markdown calculatorformula to convert seconds to hoursvba clipboard clearhow to lock formula in excel 2007solver xlamactivex listboxcalculator shortcut keycreate a checklist in excelvba case statementvbyesno msgboxcalculating exponents in excelmouseover bubbleopen rpt fileshow to create a checklist in excelstableford scorecard exampletransposed conditionaldelete blanks excelvb forms in excelexcel formula to calculate number of days between two datesconvert prn to txtexcel mirrcreating histograms in excelunprotect worksheet forgot passwordhow to unfreeze cells in excelirish payslip templateexcel irr calculationexcel vba database querymod10 check digit calculatorcoordinates converter excelexcel pension calculatorpercent complete formulaholiday excel templatecombine multiple worksheets into oneexcel overlay bar chartsnipping tool commandexcel file size increaseexcel compatibility modehow to calculate deflation rateshortcut to renamewhat is the shortcut key to hide row in excelfilter using vbaexcel pivot table count ifexcel vba cell widthexcel remove checkboxmsgbox new linedouble elimination bracket generator excelconcatenate excel 2003break schedule template excelburndown chart excel templatems access vba delete recordchurch income and expense statement templatecalculate profit in excelexcel grouping sheetsunhide all tabs in excelexcel vba sleepconvert stone to poundstrikethrough on excelaccess dlookup functionworking days excel formulagoto statement vbaconvert byte to gigabytehow to calculate average percentage in excelexcel ole actioninsert slicer excelexcel normality testmicrosoft date and time pickerhow to highlight weekends in excelauto insert date in excelweight loss competition spreadsheet templatewhy do i get pound signs in excelhow to multiply percentages in excelvba combobox rowsourcepaste value shortcutxlnone vbawhy do i get pound signs in excelvb command button