PC Review


Reply
Thread Tools Rate Thread

delete macros by macro

 
 
=?Utf-8?B?a2FybWVsYQ==?=
Guest
Posts: n/a
 
      6th Oct 2007
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
 
Reply With Quote
 
 
 
 
=?Utf-8?B?RlN0MQ==?=
Guest
Posts: n/a
 
      6th Oct 2007
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

 
Reply With Quote
 
Leith Ross
Guest
Posts: n/a
 
      6th Oct 2007
On Oct 6, 11:51 am, FSt1 <F...@discussions.microsoft.com> 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

 
Reply With Quote
 
=?Utf-8?B?a2FybWVsYQ==?=
Guest
Posts: n/a
 
      6th Oct 2007
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 <F...@discussions.microsoft.com> 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
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
A macro to delete other macros? =?Utf-8?B?RWxsZW5N?= Microsoft Excel Programming 5 25th Aug 2009 08:19 PM
Delete Macros Macro Steven Microsoft Excel Misc 1 28th Jul 2004 01:55 AM
Macro to delete Macros? Bob Vance Microsoft Excel Worksheet Functions 1 23rd Jun 2004 08:04 AM
Macro Size Limit / open macros with macros? andycharger Microsoft Excel Programming 6 13th Feb 2004 02:00 PM
Delete macros in another macro =?Utf-8?B?Sm9obiBN?= Microsoft Excel Programming 2 21st Nov 2003 10:36 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:44 PM.