delete macros by macro

K

karmela

Hi,
I have workbook where should have access more persons from my company and
need to change it. On closing it I have macro (in module of this workbook) to
delete some sheets and columns, and save it with another name. This new
workbook is read only, but in this way it contents all macros from the first
workbook.

How can I automatically delete all macros in that new file?
Or is there any better solution?

Thank you in advance, karmela
 
L

Leith Ross

hi
see this site....http://cpearson.com/excel/vbe.htm
it tells how to manipulate macros with macros.

regards
FSt1

Hello Karmeda,

Another option that you may want to consider is Locking the VBA
Project for Viewing.
Open the Visual Basic Editor and go to Tools > VBAProject Properties..

This will bring up a dialog with 2 tabs. Select the Protection Tab.
Click the check box to Lock the porject for viewing. You can also
password protect the project to prevent the users from clearing th
Lock for Viewing option.

Sincerely,
Leith Ross
 
K

karmela

Hello Leith,

thanks for yout advice, in this case there are auto_close macro, which will
run also with protected VBA

Karmela

Leith Ross píše:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top