Consulting

Results 1 to 3 of 3

Thread: Solved: Save Sheet as xls

  1. #1
    VBAX Contributor
    Joined
    Aug 2007
    Posts
    188
    Location

    Solved: Save Sheet as xls

    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

    [VBA]
    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

    [/VBA]

    Any help much appreciated

    Regards

    Sooty8

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]

    ActiveWorkbook.SaveAs Filename:="C:\Documents And Settings\PATH TO DESKTOP\Desktop\Private - Card \Card " & invnum , _
    FileFormat:=xlExcel8
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Contributor
    Joined
    Aug 2007
    Posts
    188
    Location
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •