Any way to auto enable Macros in Excel?

22
Found 24th Mar 2010
Hi guys,

Got a quick excel question,

I'm quite an advanced user in Excel but I can't for the life of me work out how to auto enable macros on one workbook.

I've thought of possibly using a welcome sheet and hide all other sheets until the user "enables macros" but I can't get the visual basic code to work.

Any ideas?

Im using Excel 2007

  1. Misc
  2. Excel
Groups
  1. Misc
  2. Excel
21 Comments

Original Poster

Ive thought about using something like this, but the code doesnt work for me, the sheets are still visible when I open the workbook.

]http//ww…379

I cant remember what you need to name the macro now, ages since I done it, but once the workbook is opened, you can enable a macro to auto run on opening.

Original Poster

ChrisUK;8191129

I cant remember what you need to name the macro now, ages since I done … I cant remember what you need to name the macro now, ages since I done it, but once the workbook is opened, you can enable a macro to auto run on opening.



so i could possibly auto enable a macro to enable macros? haha

Tools > Macros > Security > Set to low

Should do the trick?

*edit*

Sorry didn't realise it was for a single w/book.

dre1988;8191145

so i could possibly auto enable a macro to enable macros? haha



lol, you could use the "auto" macro to call your 1st one & go from there.

Have a look in the trust centre.... set the path for the file in the "trusted locations" section... this should automatically enable macro's for the file!

(office button > excel options > trust center > trust centre settings)

Original Poster

Just realised an auto macro wont work, because when you first open the workbook macros are disabled, so it wouldnt run the auto macro until i enabled macros again. lol

Original Poster

DragonChris;8192964

Tools Macros Security Set to lowShould do the trick?*edit*Sorry didn't … Tools > Macros > Security > Set to lowShould do the trick?*edit*Sorry didn't realise it was for a single w/book.



Ambdon;8192987

Have a look in the trust centre.... set the path for the file in the … Have a look in the trust centre.... set the path for the file in the "trusted locations" section... this should automatically enable macro's for the file!(office button > excel options > trust center > trust centre settings)



yeah this enables macros for whenever I use excel on my computer but Im trying to do it to an excel file on my network in work, basically for the people I work with who want to use the file and don't know how to enable macros this won't be a problem for them.

maybe should have made that clearer sorry.

did you try putting the UNC path to see if it works? (or alternatively, if everyone has a standard mapping, use that drive letter)

note - you might have to tick the "Allow Trusted Locations on my network (not recommended)"

Can I ask what happens when you use your linked example, works fine for me.

Can you not save as a macro enabled workbook - .xlsm instead of xlsx

It's one of the options under save as type

Bud Fox;8193297

Can you not save as a macro enabled workbook - .xlsm instead of xlsx It's … Can you not save as a macro enabled workbook - .xlsm instead of xlsx It's one of the options under save as type



It still doesn't open up automatically with the macros working which is what the OP is after really.

To my knowledge you cannot get excel to open up with the macros working automatically (as that's the whole point of it), the work around is that you force to the user to enable them in order to carry on.

OP do you have your settings set to low or medium security?

If set to low that's why the above linked work around does not work.

Original Poster

greg_68;8193337

OP do you have your settings set to low or medium security?If set to low … OP do you have your settings set to low or medium security?If set to low that's why the above linked work around does not work.



When I did the above nothing happens, all the pages are still visible,

erm which security settings do you mean mate?

the trust centre settings on excel options?

dre1988;8193420

When I did the above nothing happens, all the pages are still visible,erm … When I did the above nothing happens, all the pages are still visible,erm which security settings do you mean mate?the trust centre settings on excel options?



Tools > Macro's > Security. (in 2003 anyway)

Original Poster

greg_68;8193509

Tools > Macro's > Security. (in 2003 anyway)



Yeah in 2007 its throught excel options, trust settings and macro settings.

ive tried that but it doesnt work. the only thing i can think of as to why its not working is possibly because im using Excel 2007 instead of 2003. and maybe the code in the links for VB were written for 2003.

Ive been trying to do it for a few hours now, may just give up before I lose the plot haha

Did you download the file attached to the link, and did you try opening it?

Original Poster

greg_68;8193581

Did you download the file attached to the link, and did you try opening … Did you download the file attached to the link, and did you try opening it?



yep done that and the one in the file works. even tried copying the code straight from that visual basic into my workbook and it doesnt work, must be something im doing wrong somewhere.

dre1988;8193612

yep done that and the one in the file works. even tried copying the code … yep done that and the one in the file works. even tried copying the code straight from that visual basic into my workbook and it doesnt work, must be something im doing wrong somewhere.



Did you remember to rename one of the sheets or insert another called macros?

Edit, you are right when I paste it into one of my workbooks it doesn't work does it?

Original Poster

greg_68;8193705

Did you remember to rename one of the sheets or insert another called … Did you remember to rename one of the sheets or insert another called macros?Edit, you are right when I paste it into one of my workbooks it doesn't work does it?



nope lol, doesnt seem to work even after making the changes, it's a pain in the bum.

Think I might just start from scratch in access lol
Post a comment
Avatar
@
    Text

    Top Discussions