Excel 2007 macro issue

LEXCERM

Registered User.
Local time
Today, 14:53
Joined
Apr 12, 2004
Messages
169
Hi All,

I am having a problem with a .xlsm file after converting it from 2003 to 2007.

When I initially opened the file the macros worked. As soon as I saved the file and re-opened it, I received a "macros disabled/encryption" message and they stopped working.

I did another conversion and the macros again worked. If I close the file without saving and then re-open it, the macros continue to work. It's as if as soon as the file is saved, the macros disable.

The only thing I have found is that when I look at the name of the macro in the Macro Menu, it reads 'Test1.xlsm'.Module1.MACRO1' rather than just MACRO1.

It's like when you have more than one file open and it's showing you macros in another workbook (even though the file name shown is the one I am having issues with). I have "enabled all macros", "trusted access to the VBA project object model" and also added the relevant foldes in the Trusted Source centre, but to no avail.

Sorry for the long winded post.

Rgds,
Paul.
 
Howdy. Unfortunately, I can't help since I have never used 2007. But hope someone can find a solution for you.
________
Host and design
 
Last edited:
I've since established that whenever I use the code...
Code...
Code:
ActiveWorkbook.Protect Password:="password"

...it seems to disable the macros in the workbook. This takes effect once you have saved, closed the file, then re-opened it. However, I find that I cannot enable the macros anymore and the workbook then becomes un-usable.

If anyone has two minutes spare, could they please try this out in a new Excel 2007 file and tell me whether it's happening to them, or whether I am just going mad!!!

Steps-to-take:
(1) Create a new file and add the above code. Run it a few times, then save and close the file.
(2) Re-open the file and, bam, it don't work!

Thanks in advance,
Paul.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom