Excel removes Macros

janus67

Board Regular
Joined
Nov 26, 2006
Messages
144
Office Version
  1. 2016
Platform
  1. Windows
a friend made up an Excel sheet ( 2007) with a few Macros on it--- when I run it on my puter (also with 2007), it says " found unreadable content etc - do you trust the sender etc--yes
then when it opens, a box comes up that Excel has " repaired" the file - ie removed some/all the Macros-- this time I managed to read the removed parts as under--
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><logFileName>error033240_01.xml
</logFileName><summary>Errors were detected in file 'C:\Documents and Settings\k\My Documents\Ephem1980-2008DecGeo1.xlsm'
</summary><removedParts summary="Following is a list of removed parts:"><removedPart>Removed Part: /xl/vbaProject.bin part.
(Visual Basic for Applications (VBA))</removedPart></removedParts></recoveryLog>

the original sheet works fine on other puters, for some reason, not mine

are there any suggestions as to how I may get the sheet running properly please

thanks Keith
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hi Keith,

If you save the file as an .xlsx, in Excel 2007, the macros will be stripped out. Use .xlsm instead; it's the format designed to be used with VBA code.
to save yourself the hassle of having to remember, go to the Options and set the default file format to Macro-Enabled Workbook (unless you still share files with earlier versions, in which case use Excel 97-2003 Workbook)

Denis
 
Upvote 0
Hello Denis, I double checked and the 2007 file is already an 'xlsm ' file
to get around the problem, the author has made me another version for use with "pre 2007 " Excel --- I installed V 2003 and tried again but the Macros are stripped out just the same.

thanks Keith
 
Upvote 0
Hi Denis, also checked and in Options,Trust Centre, Macro settings--- is set to " enable all macros"
I couldn't find a section named "default file" in Options, although I looked all over it
I must have missed it, could you show me where it is & i'll check that too

thanks Keith
 
Upvote 0
Keith,

Go to the Options again and click the Save option in the left margin. You can select the default file format there.

Denis
 
Upvote 0
Hello Denis-- I set the default save to Macro Enabled workbook as suggested and checked a couple of times & all seems fine now

thanks for your help
Keith
 
Upvote 0
Hi janus67 I have the same problem and how did you solve this problem?

I want to open a xlsm file with macros with another computer with same excel version 2007 but it says /xl/vbaproject.bin and recovered but there is no macro ı see when it is opened.

Do you explain how you solved this?
 
Upvote 0
If you are opening an xlsm file using Excel 2007 you should be OK. Check your security settings, see that they are set to Medium.
If the file still doesn't open correctly it may be corrupt.

Denis
 
Upvote 0
If you are opening an xlsm file using Excel 2007 you should be OK. Check your security settings, see that they are set to Medium.
If the file still doesn't open correctly it may be corrupt.

Denis


hello Denis, I had the problem the same of janus67 and I set the default save to Macro Enabled workbook as suggested ,I don't see the error anymore but I can't still see the forms
 
Upvote 0
If you press Alt+F11 is there any code associated with the workbook (modules, forms?)
If not, the file may have been saved as an .xlsx before being converted to an .xlsm and Excel will have discarded the code when the file was saved. Do you have an earlier version with the code?

Alternatively, if the code is there the macros are most likely disabled. You will need to go to the Excel Options, then Trust Center, and then look at the macro settings. Set them to Medium (disable with notification).
Also, you can create a Trusted Location. Any files in that directory (or its subdirectories) will have macros automatically enabled.

Denis
 
Upvote 0

Forum statistics

Threads
1,220,363
Messages
6,153,440
Members
451,148
Latest member
wherethegoalsat

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