?
Solved

vba to save xls file without macros

Posted on 2012-03-20
5
Medium Priority
?
253 Views
Last Modified: 2012-03-21
Hi!
I have an excel file containing a macro. As the last step, the macro saves the file as an xlsx, so that it can be distributed via email without the macro.
I now need to duplicate this for users in Excel 2003. How can I do this?
Here is my current code:

Application.DisplayAlerts = False
Application.EnableEvents = False
    ActiveWorkbook.SaveAs Filename:= _
        "F:\buying\catalog production\2013\" & FName & ".xlsx", FileFormat:=xlOpenXMLWorkbook, ReadOnlyRecommended:=False, CreateBackup:=False
Application.EnableEvents = True
Application.DisplayAlerts = True

Open in new window


Thanks!
0
Comment
Question by:etech0
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 6

Expert Comment

by:wshark83
ID: 37742960
have you tried just changing the xlsx extention to xls...?
0
 
LVL 10

Author Comment

by:etech0
ID: 37742980
Will it then save without the macro?
0
 
LVL 10

Author Comment

by:etech0
ID: 37742991
I tested it - it saves with the macros. What I need is for it to save without, so I can email it to many people without encountering 'email' issues.
0
 
LVL 6

Accepted Solution

by:
wshark83 earned 2000 total points
ID: 37743378
0
 
LVL 10

Author Closing Comment

by:etech0
ID: 37749764
Thanks!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question