Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Removing a vba module or macro with another macro

  Asked By: Deepu    Date: Aug 16    Category: MS Office    Views: 1610
  

Has anyone had the need to scrub a workbook of its macros or modules?
We use several workbooks internally to generate salary record changes;
however, the macros in the workbook sometimes "halt" the system load by
bringing up the "Enable, Disable macros" dialog when being loaded.
Changing security settings is not an option.

Is it possible to remove macros from the same workbook with another
macro or does it have to be done externally, i.e., scrubbed by another
program?

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Patricia Johnson     Answered On: Aug 16

How about doing all the calculations and moving the
worksheet to another workbook. This way you can
eliminate the macros  in the destination workbook. I
have a similar appliction that generated 15 sheets of
report. I generate  this using Access and Excel and
involves 3 - 5 formatting for each sheet. I have
written the code in Access and formatting in Excel.
Finally once the Job is done i create another workbook
and transfer the sheets to another workbook. By this
way the Template file remains unaffected.

 
Answer #2    Answered By: Calandre Bernard     Answered On: Aug 16

I've considered that, but there is one additional issue; the last
macro sends the workbook  using SendMail as an attachment to our ER
group which then reviews it and uploads it to the accounting system.

By copying to another workbook, we then have to return to the manual
send workbook as an attachment and add other data to the email that
I had automatically generated in the submect line.

The other idea that came up while discussing with a friend at work
was to create some code attached to a button on the ER groups
toolbar that would, when activated, check the open workbook for
macros and remove  them. This would be the ultimate solution as we
also have several hundred employers who send us salary data via
electronic of workbooks. We could get rid of all macro  code form
internal or external sources.

 
Didn't find what you were looking for? Find more on Removing a vba module or macro with another macro Or get search suggestion and latest updates.




Tagged: