Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Programatically save EXCEL file to earlier version...

Status
Not open for further replies.

VisualGuy

Programmer
Joined
May 27, 2003
Messages
162
Location
US
I would like to be able to control what version an EXCEL file is saved in. I run EXCEL 2007 on my workstation. So whenever I create a new excel file, even if I reference an earlier version of Interop.Excel, people who are running an earlier version of excel cannot open my files. Can't this be controlled?

wbNew.SaveAs("MyFile.xls")

 
Example: In Excel 2007 save as 2003 Workbook.
Code:
wbNew.SaveAs("MyFile.xls", 56)
Best advice I can give for working in Excel is if your not sure what to do then record a macro of what you need to do in Excel and then look at the VBA code for it. Something like this would show 56 as xlExcel8. You could then go here: to find out what that means.

-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top