VBA Password - Excel keeps prompting for it

O

OMER

Hola,
I have a workbook in which I protected the VBA code with a password. It
works fine. The user doesn't have access to the code. I'm automatically
setting the Solver referece using the following code (partly shown).

Set oWB = ActiveWorkbook
strSolverPath = Application.LibraryPath & "\SOLVER\SOLVER.XLAM"
With AddIns("Solver Add-In")
.Installed = False
.Installed = True
End With
oWB.VBProject.References.AddFromFile strSolverPath


The situation is that when the user opens the workbook it's being asked for
the VBA Project password. The user clicks Cancel and continue without the
need to know the password.

Is there a way to prevent the code to prompt for password?
(I want to keep the code password protected).

Thank you for your help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top