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

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Try using:
Code:
ActiveWorkBook.SaveAs Filename:=ActiveSheet.Name, xlworkbooknormal
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,748
Members
448,989
Latest member
mariah3

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