Allways enable macro for 2003,2007,2010

alinpion

Board Regular
Joined
Jul 12, 2011
Messages
79
Hello!

I have a excel file with two sheets (tabs) and on one of them I have a password (on that sheet I have inserted a macro code that protect's the sheet with a password). The file is done with 2003 excel program and whan I open the file with 2007 a dialog box appears telling me thet the macro code is disabled and is I want to enable it. The troblem with the disabled macro.vba code is that the protection doesn't work any more.
The document will be oppened by other's with 2007 excel and I don't want them to see the content of the protected sheet.
What changes do I have to make in my excel file to prevent the macro enable/disable box to appear in excel 2007?
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
I don't think you can force enable Macro. What I have done in the past is write a BeforeClose code that makes the file unusable (like get all the sheets xlVeryHidden, change colors and stuff). Your opening macro reverses all that. That means that if you don't enable macros, the file is not usable.
Hope it helps.
 
Upvote 0
I don't think you can force enable Macro. What I have done in the past is write a BeforeClose code that makes the file unusable (like get all the sheets xlVeryHidden, change colors and stuff). Your opening macro reverses all that. That means that if you don't enable macros, the file is not usable.
Hope it helps.

That means that vba code for protecting a tab in a excell workbook is useles in excel 2007 no?

Do you have other ideas on how to put a password on just one tab (the password lock's the sheet/tab ; you can't see any content of that tab until you provide the password) since vba/macro is not working unless is activated?
 
Upvote 0
If there are other ways, I am not aware of them. My best advice is to get this tab xlVeryhidden and then do a Save BeforeClose. When correct password is entered, unhide the sheet.
Other protection means will prevent users from changing anything in the sheet but they still will be able to see it.
 
Upvote 0
I can't believe that there is no possibility to set up the workbook macro to always be on, no matter if you open the file in excel 2003, 2007 or 2010.

If this is true then all file's protected with macro can be opened in excel 2007 with no problem. I can't believe that the guys from microsoft could do such a rubbish feature!!!
 
Upvote 0
I can't believe that the guys from microsoft could do such a rubbish feature!!!

This is not a rubbish feature. The main reason stem's from not enabling a macro which could be harmful to your system.

In Excel Options >> Trust Center >> Trust Center Settings >> Trusted Locations you can setup a trusted location on your machine, but this will not work for others.

Like you have already been advised, check this out...

http://www.vbaexpress.com/kb/getarticle.php?kb_id=379
 
Upvote 0
...If this is true then all file's protected with macro can be opened in excel 2007 with no problem....
This is pretty much true for 2007 and every other version of Excel. Excel is not a secure platform and has never pretended to be one.
It is a safe platform (i.e. protects the rest of your computer) but not a secure (good for secrets) platform. And has never pretended otherwise.
 
Upvote 0

Forum statistics

Threads
1,222,045
Messages
6,163,583
Members
451,846
Latest member
ajk99

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top