Macros code protection

praneetbvb

Board Regular
Joined
Aug 24, 2012
Messages
56
Hi,

I have designed a macros code for my team, which i presently in my personal workbook.

Now, I want to lock the macros code so as to nobody can access it and send it to my team guys, so that each one of them can individually run the macros whenever they need it.

How can it be done???
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
20,881
Office Version
  1. 2016
  2. 2013
  3. 2007
Platform
  1. Windows
Save the code into the workbook that you are going to send out to your team
The go into the VBA editor, right click on the workbook in the LHand window
Select VBA ProjectProperties
then Protection
Tick the "Lock for viewing" checkbox
and put in a password to keep it locked.

Remember though, that password protection in Excel is not very secure.
 

praneetbvb

Board Regular
Joined
Aug 24, 2012
Messages
56
Save the code into the workbook that you are going to send out to your team
The go into the VBA editor, right click on the workbook in the LHand window
Select VBA ProjectProperties
then Protection
Tick the "Lock for viewing" checkbox
and put in a password to keep it locked.

Remember though, that password protection in Excel is not very secure.



Nope, that is not my concern.

The code is in my personal workbook.. So when I want mail the workbook to someone else, he/she would not be able to run the macros as it is in my personal workbook.

So, I need that I move the code out of my personal work book and lock the code. Then probably mail a blank work book or something to my team with the macros in it, So that they open the raw files and then run macros on it.

How can it be done?? that was my ques..

Thanks!!
 

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
20,881
Office Version
  1. 2016
  2. 2013
  3. 2007
Platform
  1. Windows
I've given you the answer...copy the code that is in your personal workbook, into a blank workbook, then protect it as I explained.
 

praneetbvb

Board Regular
Joined
Aug 24, 2012
Messages
56

ADVERTISEMENT

I've given you the answer...copy the code that is in your personal workbook, into a blank workbook, then protect it as I explained.


Still I guess, we both are not on same page.

I'll explain.

Ok, I have creates a macros for my team, which on running it, kind of formats, filters etc the raw files downloaded from server, thus making them presentable.

Now the macros code is in my personal workbook.


So I want to send the macros code out to my team, so that they cannot view the macros code, but they should be able to download those raw files from server then simply run the macros, so that the raw files get formatted.

They then just simply save the formatted files at the desired location.
 

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
20,881
Office Version
  1. 2016
  2. 2013
  3. 2007
Platform
  1. Windows
my friend, I'm sorry, but I simply don't know how else to answer your question....:oops:
maybe someone else will step in and offer their opinion....
 

Kyle123

Well-known Member
Joined
Jan 24, 2012
Messages
2,718

ADVERTISEMENT

FWIW I agree with Michael, your personal workbook is just a workbook. So doing as he suggests would work.

I think an add-in might be more suited to what you're trying to do though
 

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
20,881
Office Version
  1. 2016
  2. 2013
  3. 2007
Platform
  1. Windows
Kyle, of course the addin or even a template, would do the trick....:wink:but, I thought starting simple would be the way to go.
And I was beginning to wonder whether I was completely missing something...in fact I still may be !!!
 

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
20,881
Office Version
  1. 2016
  2. 2013
  3. 2007
Platform
  1. Windows
@praneetbvb Why not do a SaveAs on the personal workbook...and save it as whatever you like.

@Kyle thanks for the heads up on the cross post.
 

Forum statistics

Threads
1,141,068
Messages
5,704,099
Members
421,327
Latest member
Msh

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
Top