PDA

View Full Version : Solved: Save Sheet as xls



sooty8
11-12-2010, 02:33 AM
Hi Good Morning

Using the code below I save the sheet into a desktop folder however it always saves as an Excel Worksheet what code would be needed to make sure the sheet is always saved as an Excel 97-2003 Worksheet


Sub Card()
On Error Resume Next
Dim invnum As String
Application.ScreenUpdating = False
Dim iRow As Long
Dim ws As Worksheet
invnum = Range("J61").Value
Set ws = Worksheets("Card")
Sheets("Card").Copy
ActiveSheet.Name = invnum
'Columns("L:O").Hidden = True
ActiveWorkbook.SaveAs Filename:="C:\Documents And Settings\PATH TO DESKTOP\Desktop\Private - Card \Card " & invnum
ActiveWorkbook.Close
Sheets("Card").Select
Range("B7").Select
Application.ScreenUpdating = True
End Sub



Any help much appreciated

Regards

Sooty8

Bob Phillips
11-12-2010, 02:40 AM
ActiveWorkbook.SaveAs Filename:="C:\Documents And Settings\PATH TO DESKTOP\Desktop\Private - Card \Card " & invnum , _
FileFormat:=xlExcel8

sooty8
11-12-2010, 03:01 AM
Hi Xld

It's easy when you know how Eh!!

Many thanks - once again the Lone Ranger solves the problem and saves the day.

Regards

Sooty8