SaveAs problem in 2007

brindle1121

New Member
Joined
Feb 25, 2009
Messages
4
I have a VBA macro that says....

Application.VBE.ActiveVBProject.VBComponents.Import ("C:\..etc..")
ActiveWorkBook.SaveAs Filename:=ActiveSheet.Name


I'm riunning the macro in XL 2007 which I have configured to use .xls formats. I would assume this Excel 2007 formats any new workbook file in .xls. always. Is this correct?

I'm, using an Import and Export command to move other macro code in another module from the source workbook into each new workbook. This all works fine in XL2003.

But running the macro in XL 2007 I get the following error message:

======================================
The following features cannot be saved in the Macro free
worksheet:

VBProject

To save a file with this feature, click No and choose a macro-enabled
file type.
=======================================

Why am i getting this error message? Is thers something special about ActiveVBProject?
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Try using:
Code:
ActiveWorkBook.SaveAs Filename:=ActiveSheet.Name, xlworkbooknormal
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

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