Save file as XLS (2003)

E

EE

Hi

I have a macro that I use to save a sheet as a new file. Now I have a
requirement that it needs to be saved as only XLS and not xlsx. The
macro is used in computers with Excel 2007.

The code snippet is as follows:
************************
Sub ShowCostSheet()

Dim Wb As Workbook
Dim ws As Worksheet
Dim sStr As String
Dim i%, rng As Range
'Set Wb = Workbooks("Pricing Tool.xls")
Set Wb = ActiveWorkbook
Set ws = Worksheets("Cost Calculation Sheet")
'This part saves the workbook in My Documents
sStr = Sheets("Cost Calculation Sheet").Range("COSTCALC") & " - "
& Sheets("Cost Calculation Sheet").Range("D6") & " - " & Format(Date,
" mm-dd-yy")
ws.Copy
ActiveWorkbook.SaveAs sStr

End Sub

*********************

Thanks for your help.

Best
Prasad
 

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

Similar Threads


Top