Password protect a xlsm file with VBA macros

Since we now have all Office 2007 (and 2010 beta in some cases), I have started using it's improved functionality - It does the same in both 2007 and 2010 beta.

I have a xlsm workbook which has a self updating 'table' in it.
The file is quite locked down, and has a menu page with buttons.  These contain very simple macros like this:
Sub Macro1()
    Sheets("sheetname").Select
End Sub
There are 5 of these.

When I try to save the file with the password on it, I get this error:
"This workbook contains Excel 4.0 or Excel 5.0 modiles. If you would like to password protect or restrict permission to this document, you need to remove these macros."

I have spent a good couple of hours researching ways around this, with no luck so far.
I can't use .xls as I want to use the 'table' feature.

I am saving this file in a 'trusted location' (as set in the trust center).
I also have 'Enable all macros' and 'Trust access to the VBA project object model' set.

I wonder if there is some registry hack to get around this problem?
We could use other methods for this particular document, (unhide sheet tabs, and show only the one's we want to access) but that's not the point  -  We have LOTS of other files with more complex macros so I would like a solution rather than a work around.

Thanks!
CreepyDAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rory ArchibaldCommented:
Are you sure you don't have any old macro sheets in the workbook?
0
CreepyDAuthor Commented:
Thanks for prompting me to look again..
I just moved the macros from where they were (under Module1) to where they are now (under ThisWorkbook) and it has now let me save it as .xlsm.
Hopefully this solution will work for our more complex macros too.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Rory ArchibaldCommented:
That should not be necessary -  the macros do not belong in the ThisWorkbook module, they belong in a normal module - and should not in fact make any difference. Could you post one of these files? (remove any data)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.