ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   delete macros by macro (https://www.excelbanter.com/excel-programming/398835-delete-macros-macro.html)

karmela

delete macros by macro
 
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

FSt1

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

regards
FSt1

"karmela" wrote:

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


Leith Ross[_2_]

delete macros by macro
 
On Oct 6, 11:51 am, FSt1 wrote:
hi
see this site....http://cpearson.com/excel/vbe.htm
it tells how to manipulate macros with macros.

regards
FSt1

"karmela" wrote:
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


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


karmela

delete macros by macro
 
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:

On Oct 6, 11:51 am, FSt1 wrote:
hi
see this site....http://cpearson.com/excel/vbe.htm
it tells how to manipulate macros with macros.

regards
FSt1

"karmela" wrote:
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


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




All times are GMT +1. The time now is 06:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com