Free Microsoft Excel 2013 Quick Reference

Unlocking VBA project in Excel


I have one password protected vba project in my excel file. I want to unlock
this vba project through C# code. Could anyone help me on this?

I tried the sendKey function of C# but still not able to get through. Here's
the code that I have used:

SendKeys.Send("%F11%TE" + Pwd + "~~");

Pwd is the variable containing the password to unlock the vbaproject.


Post your answer or comment

comments powered by Disqus
Don't know whether or not this is the proper place for this, but tried it in
the Word VBA-General NG (same problem whether Word or Excel) and haven't had
any response (I'm not impatient, but I posted it On Oct 28th).

Is there a known problem with locking a VBA project in Office 2000 and
trying to unlock it in Office '97?
(ie (Project/Module) Properies->Protection->"Lock Project for Viewing")

Because I wanted to prevent the user (another organization) from monkeying
around I thought it seemed straightforward enough when I did it on my home
machine (Off 2000). Worked fine, popped up a password dialogue box and
opened it when I supplied the password.

Zipped/Sent the file to work and attempted to modify it on Off '97.
All I get is a "Project is Unviewable" message (no password box - nothing).

I opened it on a 2000 m/c at work and it worked fine.

Is there a secret?



I need to unlock the VBA project in an Excel file, but I don't know the

I know, that there is a brute-force password cracker for protected
worksheets, but only for worksheets - no VBA projects.

Is there any other tool for this?

Note that I already know, how to extract source codes from Excel file (using
modified ClamAV) - but I need also to modify it, not only extract...

Thanks in advance!


A user has Excel 2007 and gets this message "Lost VBA Project and Active X" when they open the app.

I have confirmed that macros are enabled.

Some site I have been to indicates it might be a missing dll file, and I also saw code to recover lost passwords and VBA projects, but did not see one for Excel 2007.

I need to get this user up by Friday. Any assistance will be greatly appreciated.

Hi Excel Forum users, I am new here but not to excel
are you able to suggest a cause & solution to this one?

I've inadvertently created 6+ new VBA projects in the workbook with the saved changes
however the macro changes don't work
i guess it still refers to the original
when I try & open the original VBA projects module it says 'out of memory'

the macro is there to remove a 'U' for upload in a EzySolutions (Excel Add-in for SAP data uploads) where no data exists in a row

I want to add two more if then statements to refer to 2 rows in EzySolutions

EzySolutions sheet refers to a customer data form

Thanks in advance


Hi All,

Is it possible to create charts in power point using vba codes in excel?
Generally what i do, i create a chart in excel based on some data in excel and then i copy it and paste (special) in a power point as 'picture (enhanced metafile)'. But i want that the charts to be prepared in power point because it looks better than the excel one.


I am trying to start a VBA Macro in Excel using a VBScript in my browser.

Below you can see my - not working - chunk of code.

All suggestions are welcome!

******** LANGUAGE="VBScript">


Push the button to start the script.

Thanks in advance.




I have a fairly extensive VBA project in Excel, which I've locked bot
for viewing and for property changes with a password. Every now an
then (but not always), the project password dialog will appear when
close the workbook, and I either have to enter in the vba projec
password or press cancel 20 or 30 times--something that would be ver
annoying for my users. Can anyone tell me what is causing this and ho
I may get around it?


mmm9999's Profile:
View this thread:

how do i get the name of a newly added sheet that i add with Sheets.Add in a
vba macro in excel?


I have a fairly extensive VBA project in Excel, which I've locked both for viewing and for property changes with a password. Every now and then (but not always), the project password dialog will appear when I close the workbook, and I either have to enter in the vba project password or press cancel 20 or 30 times--something that would be very annoying for my users. Can anyone tell me what is causing this and how I may get around it?


I am trying to create a vba code in Excel to go to a list of files and
compare the file name that I entered manually with the list to determine if
there is a file out there by that name. If there is not a file out there, an
error message will be generated telling me that the file does not exist and
to enter a new file name.

Is there any way to truly protect VBA projects in Excel?

I'm aware of how to password protect a project, but I'm also aware that
I can purchase a utility for less than $50 that claims it will open any
password protected project regardless of password length or complexity.
Does anyone have any experience with this product or similar? Can they
really work as claimed?

The questions are academic rather than practical. I'd like to know, but
I don't want to spend $50 to find out if it really works and I really
don't have any interest in using it. I do protect most of my projects
and would like to think it takes more than that to break security. I'd
be much more interested in securing projects somehow that would take
more savvy than downloading a file and clicking through an interface to


Is there any possibility to quit from application PowerPoint launched
through VBA codes in Excel?

I have the following code in Excel:

Sub LaunchPPT()
Dim PPSlide As Object
Set PPSlide = CreateObject("PowerPoint.application")
With PPSlide
.Visible = True
.presentations.Open filename:="C:InfoDataProgramasInfoGraph.pps"
.Run "InfoGraph.pps!UpdateAllLinks"
.presentations("InfoGraph.pps").Saved = True
End With

Help me, please!

I am new to VBA in Excel, and was trying to make a macro that would
work in all workbooks. Is there a Global VBA Project in Excel that
could accomplish this?



I wonder if anybody has any ideas about how I could track a project in Excel - does anybody have a template that I could use?

Many thanks


The article at this link,;en-us;555159, describes
"How to use a class (object) from outside of the VBA project in which it is

I need to do something similar, but not quite the same: I have a class
module in an Add-in (vba) file that contains application level events.
Rather than using an object as described in the article, I need to use the
application level events that are defined in a class module that is located
outside of the VBA project in which it is declared.

Since I have not actually defined a class, I'm not sure what to do in the
step where code is written to instantiate the 'foreign' object.

I have attached the add-in file, in case my question is not clear. This is a
little beyond my normal level of expertise, so I will appreciate any help
that may be offered.



I have VBA code in Excel which restrict access to a workbook depending on the user login detail, the workbook contains 11 sheets, worksheet are asigned to different user depending on the user login detail The problem I have is when i open other worksheet or workbook the VBA code starts to effect the other worksheet/ workbook, is there a way I can stop this from happening.

please help


After installing excel 2010, i´m not able to open xlsm files or access the VBA coding screen (View code for any excel sheet).

When i open .xlsm files it says:

Excel found unreadable content in 'Schema_2012.xlsm'. Do you want to recover the content of this workbook? If you trust the source of this workbook, click yes.

When i click yes, i get this:

Excel was able to open the file by repairing or removing the unreadable content.

Then i can see the link 'Click to view log file listing repairs':

<?xml version="1.0" encoding="UTF-8" standalone="true"?>
-<recoveryLog xmlns=""><logFileName>error213200_01.xml</logFileName><summary>Errors were detected in file 'N:Tech SupportSchemaSchema_2012.xlsm'</summary>-<removedParts summary="Following is a list of removed parts:"><removedPart>Removed Part: /xl/vbaProject.bin part. (Visual Basic for Applications (VBA))</removedPart></removedParts></recoveryLog>

If i open new blank excel sheet i noticed that i´m not able to access ''VBA screen / View code screen'.
I did enable both ActiveX and Macros in File -> Options -> Trust center. The change did nothing.

Q1) Does anyone know how the get VBA working in Excel 2010?
Q2) How i can open xlsm files? The answer would probably be to get VBA working first.

I am trying to create a macro where at the click of a button, MS Excel
takes the data from cells containging a "Step Name" "Start date" "End Date"
and "List of Resources" and creates a MS Project document containing this
Any suggestions on how to do this would be helpful, but the way I
currently have it going and NOT working is by using a already created linked
Project file that dynamically updates to reflect the datat in excel and
having the Macro open, update the linked info, save under a new name and
close. The problem is that the links remain after the save, and i want a
static file in the end. So perhaps someone could tell me how to use Excel
based VBA to programm Project to remove links from data.

Hopefully I get an answer.

I've been asked to update an excel vba project that has been lock by someone
else. This person of course has left our company and nobody noknows what the
password is. What are the ways, if any to unlock this project.



I am experiencing the following problem in Excel 2007 relating to the atpvbaen.xls VB Project reference in a model.

Model was created in Excel 2003, ported to 2007. Excel could not find the appropriate reference in Excel 2007 when running my VBA code, hence copied atpvbaen.xls to a folder in my documents and pointed the reference at that.

All worked well for a time, but then took the model home to run on my home PC, which again could not find the ref (as it was on a work PC network drive). Pointed the model at atpvbaen.xlsm on home PC in the Office directory. Brought model back to work (having unchecked the reference and pointed it back to atpvbaen.xls on the appropriate work drive location) and I experienced all kinds of issues (e.g. model slow to save when another workbook is open, model crashes when I attempt to save sided by side with an older version of the same model open at the same time etc. etc.). I am assuming this is due to crossed wires resulting from the multiple different references to atpvbaen as no other material aspects of the model were changed.

Brought model back home to remove all reference to atpvbaen which is actually not necessary to run the model due to some coding changes, but I can't seem to get the reference out of the list of references no matter what I do, including running macros to remove it programatically. Is there anything I can do to get rid of this reference?

Many thanks for all help.

(Note: Let's "critically evaluate" the password protection feature for VBA Projects. We do not discuss "Techniques to break a password" here.
Also, let's restrict our scope to VBA projects.)

VBA Project protection:
- In VBE, there is a feature to password protect your VBA project.
- In order to view the code and Userforms of a password-protected project, you need a password.

Also, Let's compare the VBA Project-Protection with the file-open password feature of an Office document, such as Word or Excel file.

Word, Excel file-open password:
- With password "breakers", an average password of 7 or more characters takes ages to break by Brute-Force techniques.
- In order to open a file, you need to know the actual password. If a password is "hello", you need "hello" to unlock it.

VBA Project password:
- No matter how long a password is, it takes less than 0.5 seconds to find out the password.
- Most VBA Project passwords have a 4-character "equivalent". It means, you set a 25 characters password, and someone can open it with a 4-character password.

Other Info:
- The "History" of Word, Excel file-open password protection is longer than the VBA Project password protection.
- There should be no convincing arguement to say value of VBA code in a file is lower than the text or numbers in a file. Therefore, there is no convincing arguement to say that "VBA Projects deserve to be less securely protected".

Let's talk about this.
Welcome anybody's idea, welcome especially someone in Microsoft.

A Microsoft representative, for example, can tell us:
- how you did the functional specifications for that function;
- was the person who designed that function been fired or anyone should be held responsible for the w-r-o-n-g design?
- who decided to continue to adopt the wrong design? Who is responsible for this? (this is different from the point above.)
- tell us some names. (We deserve to know the names, as, for example, if you were killed you want to know who killed you.)
- Any escalation procedure for problems?
If "negative" for points 2, 3, 5 above, Microsoft, you have a lack of controls in your software development operations, and either your Group Internal Audit department or your auditors should be replaced.

I have recently upgrade from Office XP to Office 2003. I'm running XP Pro
w/SP2 and all of the updates for Windows and Office. Here is the problem I'm

When trying to run macros in Excel 2003 I get the following error message:
"This workbook has lost its VBA project, ActiveX controls and any other
programmability-related features."
Not sure why I'm getting this message, everything is installed from the
CD. I have done all of the troubleshooting listed on Microsoft's website,
and nothing seems to help. But if I go back to Excel 2002 and run the same
program I don't have any problems.
Any thoughts?


I need to unlock the VBA project in an Excel file, but I don't remember the

I know, that there is a small script, that is searching for password for
protected worksheet using brute-force technique. But it only works for
worksheets - not for VBA projects.

Is there any other tool for this?

Thanks in advance!



1. I open a file, write some code, then close the file

2. even though the file was closed it's code is still viewable in
Project - VBA Project window, as if the file was still open

the only way I know to have the file REALLY closed in Project - VBA
Project window is to Exit and re-start Excel

does anyone know a better way?


No luck finding an answer? You could always try Google.