Protect Macro Coding

P

Paul Moles

Is it possible to protect just one module in Excel 2002.
As VBA project properties seems to lock the entire lot,
including the ability to create/record a new macro without
first entering the password. Which I'd rather not
circulate.

Sub HideMe ()
ThisWorkbook.Modules("Module1").Visible = False
End Sub

Is in the knowledge base for previous versions and sounds
like what I want but it doesn't seem to work in 2002.

Any Help Appreciated

Paul
 
T

Tom Ogilvy

That only works in xl5 and xl95 which had modules "sheets" rather than the
current type of module which was introduced in xl97.

You would need to move your code module to a separate workbook and make it
an addin. Then create a reference from your workbook to the addin.
 

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