Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying Excel Macros

Status
Not open for further replies.

skygirl65

Technical User
Jul 18, 2004
32
US
I have several macros recorded in the personal.xls workbook on my laptop. I need to be able to copy those and give them to my team members. I keep having secrutity problems. What is the best way to do this?

 
Hi

Not quite sure what types of security problems you are refering to. Is it on the copying part or on the executing of the macro part?

If the problems are on copying tne macro to the hard-disk, then I presume you have not have the appropriate administrative right to do so.

But if the problems are on execution of the macro within Excel, then very likely that the security level in Excel is set to High.

 
It's not quite that simple. I have reset the security to low and am still having the problem. what is the best way to copy macros? Should I copy the whole Personal.xls file? Rename it?

 
How about saving personal.xls with a different name in a shared folder, read only recommended.

Then the team can open the workbook and access all the macros. If opened read only then several can open at same time. You (or any team member) can open without read only to amend the macros or add new ones).

For new macros:
create a macro in your personal.xls, in a separate module then in the Visual Basic Editor use the properties window (F4) to rename the module to something meaningful.
Now export the macro.
Open your Shared Macros workbook.
Alt-F11 to open VBE
Import the file you just created
Save the workbook
Tell the team there is a new macro.

The above approach does not necessitate explaining to the team how to create a personal.xls.
Beware macros that have the same shortcut keys as others your team may have created. Identical names of sub-routines causes fewer issues.

Finally you could develop a macro that opens your shared macros file (read only, with worksheets hidden). Save this in Personal.xls linked to an on-open event. All your macros will always be available just as if they were in personal.xls. Best of both world I reckon. My robust, checked, generic macros are all in one workbook. Those in development or being trialled are in personal.xls (usually).

Thanks,

Gavin
 
P.S.
Not sure that you have clearly answered LSTAN's question about security issues. I see no reason why my response should ease any of those problems - sorry!

Thanks,

Gavin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top