How to remove all macros (hidden+visible+VBA) from an excel file.

MASOODAHMAD

Board Regular
Joined
Mar 28, 2012
Messages
105
Platform
  1. MacOS
Hi,

I am facing one problem with one Excel file. While opening it displays a message that "This workbook contains macros.....". However, I have checked all the macros, VBA modules etc, but hardly find any macros or VBA. It seems that the creator has inserted some macro in a hidden format.

I am using Office 2011 (Mac) and MS Office 2004 (Mac). I also tried it in PC, but didn't get any success.

I guess there could be some software which can clean up the Excel file in one single click. Any help will be appreciated.

Thanks,
Masood
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
One of the easiest ways that I can think of is to save the Excel file as .xlsx instead of .xlsm. That will remove all macros.

Besides that, open the Visual Basic Editor and go into each sheet within the project and delete everything and then make sure that all modules are deleted. If there are hidden macros, they also may be password protected, so option 1 may be best.
 
Upvote 0
Hi Scott,

Thanks, but I already tried saving the file in xlsx format from xls. However, re-saving the file in xls is re-creating the problem. I also checked for the modules, but there isn't any.

Any other idea(s)..... please :)
 
Upvote 0
One other option to try.


Unhide any worksheets that may be hidden.
Select all the worksheets in the workbook. (Click on the first worksheet tab, then hold down Shift as you click on the last worksheet tab.)
Right click on one of the worksheet tabs. Excel displays a Context menu.
Choose Move or Copy from the Context menu. Excel displays the Move or Copy dialog box.

Using the To Book drop-down list, choose (new book).
Make sure the Create Copy check box is not selected.
Click on OK.
Rehide any worksheets you unhid in step 1.

Removing All Macros (Microsoft Excel)
 
Upvote 0
Why would you save from an xlsx to an xls format? Keeping the format as xlsx, as Scott says, will ensure no macros can be saved to the file.

Excel 2011 can be an odd creature.
 
Upvote 0
@Zack, @Scott, the reason for down-saving the xlsx file to xls is that the end user uses Office 2004 (Mac).

Scott, I have already tried your suggestions, but the error continues as soon as I down-save the file to xls. I leave this topic here. I have something else for your genius minds. I am currently working on Office 2007 and wants an equivalent formula to work in Office 2003.

=SUMIFS(Data!$I$8:$I$4000,Data!$A$8:$A$4000,">="&$M$8,Data!$A$8:$A$4000,"<="&$N$8)/60

=(SUMIFS(Data!$I$8:$I$4000,Data!$A$8:$A$4000,">="&$M$8,Data!$A$8:$A$4000,"<="&$N$8) -SUMIFS(Data!$I$8:$I$4000,Data!$D$8:$D$4000,"E-AWC",Data!$A$8:$A$4000, ">="&$M$8,Data!$A$8:$A$4000,"<="&$N$8))/60


Can anyone help me out and give me the equivalent 2003 formula for the above twos.

Thanks in advance.
 
Upvote 0
Solved it myself:

=SUMIFS(Data!$I$6:$I$4000,Data!$A$6:$A$4000,">="&$M$6,Data!$A$6:$A$4000,"<="&$N$6)/60
=(SUMIFS(Data!$I$6:$I$4000,Data!$A$6:$A$4000,">="&$M$6,Data!$A$6:$A$4000,"<="&$N$6) -SUMIFS(Data!$I$6:$I$4000,Data!$D$6:$D$4000,"E-AWC",Data!$A$6:$A$4000, ">="&$M$6,Data!$A$6:$A$4000,"<="&$N$6))/60

equivalent for 2003
=SUMPRODUCT((Data!$A$6:$A$4000>=$M$6)*(Data!$A$6:$A$4000<=$N$6),(Data!$I$6:$I$4000))/60
=(SUMPRODUCT((Data!$A$6:$A$4000>=$M$6)*(Data!$A$6:$A$4000<=$N$6),(Data!$I$6:$I$4000))-SUMPRODUCT((Data!$A$6:$A$4000>=$M$6)*(Data!$A$6:$A$4000<=$N$6)*(Data!$D$6:$D$4000="E-AWC"),(Data!$I$6:$I$4000)))/60

Thanks to all :)
 
Upvote 0
do you have any strange named rangeslike below

Name: Sheetnames
refersTo: =REPLACE(GET.WORKBOOK(1),1,FIND("]",GET.WORKBOOK(1)),"")

this would produce an warning like " This workbook contains one or more microsoft 4.0 macros...."
 
Upvote 0
Upvote 0

Forum statistics

Threads
1,216,085
Messages
6,128,733
Members
449,465
Latest member
TAKLAM

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
Back
Top