Code to save workbook without macros

S

Sheldon

Hello -

I am awfully rusty in Excel. I currently am working in 2007.

I need to write code that will save an .xlsm workbook without the macros.

I also need code to save it to a particular file name and always that
particular file name, even though it's going to overwrite the file.

Any help will be most appreciated!
 
R

RyanH

Ummm, without macros? You would then need to move your mouse to the Save As
sub menu.
 
R

Ron de Bruin

Save the workbook as xlsx and the macro's are gone

Application.DisplayAlerts = False
'Save code
Application.DisplayAlerts = True
 
S

Sheldon

Thanks for your replies!

I tried using Ron's code and it works beautifully, however, I now have
another problem. I am left in the xlsx document and my xlsm document has
"disappeared." When I try to open the xlsm document, the macros just fire
and I end up in the xlsx document, which would mean I would never be able to
Edit the xlsm document.

How can I fix this?
 
R

Ron de Bruin

One way is set security to medium if you want to edit the code
Say No to use macro's
 
G

Gord Dibben

I've already got several DVD's from MSDN subscriptions with 2007 so the
availability is not the roadblock.

I'll have to get you to email me the full instructions for setting up
Virtual PC with Windows XP and Office 2007<g>


Gord
 
D

Dave Peterson

I wouldn't do it, Gord. In fact, I'm not sure you can. You may need 512M for
just the virtual PC.

I had 1GB of RAM and when I set up VPC to use 512M for WinXP Pro and Vista Home
Premium, the both worked exceedingly slow.

I added 2GB (3GB total) and set up each of the VPCs to use 1.5M and they're not
too bad.

FYI, the WinXP Pro .vhd (virtual harddrive?) takes about 12GB. And the Vista
Home Premium is at 10GB.
 
G

Gord Dibben

Thanks Ron and Dave

That's the message I also get from lurking around the VirtualPC news group
for a while.


Gord
 
G

Gary Keramidas

in my opinion, don't do it unless you need more than 65000 rows or 256 columns.
vba code runs slower, the interface sucks and some code isn't compatible.

that's my opinion.
 
S

sbitaxi

I wouldn't do it, Gord.  In fact, I'm not sure you can.  You may need512M for
just the virtual PC.

I had 1GB of RAM and when I set up VPC to use 512M for WinXP Pro and Vista Home
Premium, the both worked exceedingly slow.

I added 2GB (3GB total) and set up each of the VPCs to use 1.5M and they're not
too bad.

FYI, the WinXP Pro .vhd (virtual harddrive?) takes about 12GB.  And theVista
Home Premium is at 10GB.

Dave/Gord - does that mean you two are using Macs? Why else would you
be running VPC? I'm primarily a Mac user and would love to be able to
use Excel at home with VBA. Even the VBA that comes with 2004 is
limited and 2008 is non-existent!


Steven
 
D

Dave Peterson

I use a WinXP Home pc.

When xl2007 arrived, I didn't want to install it on my pc (just too chicken).
Same thing with Vista.

So instead of breaking something that works <vbg>, I downloaded VPC from MS and
installed a couple of virtual pc's.

So I can experiment with xl2007 and with Vista knowing that there's nothing I
can do to really screw up my "real" pc.

I thought that there were a few of windows simulators that you could use with a
Mac.

A search of google came up with this list:
http://www.macwindows.com/emulator.html
 
D

Dave Peterson

ps. I've read some posts that say that MS is going to add VBA to the next
version of MacOffice. (I have no idea when that is.)
 
S

sbitaxi

ps.  I've read some posts that say that MS is going to add VBA to the next
version of MacOffice.  (I have no idea when that is.)

I'm hoping it's better than the last time. 2004 does run VBA but there
are enough limits to it that it isn't worth putting time into learning
how to convert PC macros for Mac Macros.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top