+ Reply to Thread
Results 1 to 2 of 2

VB code to auto save file as excel 2010

  1. #1
    Registered User
    Join Date
    12-13-2010
    Location
    england
    MS-Off Ver
    Excel 2010
    Posts
    3

    VB code to auto save file as excel 2010

    Hi,

    I have a macro that creat's a price list for individual customers annd saves the file using

    ChDrive "K:\DIVISION\swlicens\Price list test tool\Price list"
    ChDir "K:\DIVISION\swlicens\Price list test tool\Price list"

    ActiveWorkbook.SaveAs Filename:=UCase(Range("a2")), FileFormat:=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
    , CreateBackup:=False

    Dim sFileName As String
    sFileName = Range("A2").Value

    ActiveWindow.Close

    is there a way to set this so that it automatically select office 2010 xls (marco free) as the file format as this reduces the files sixe from 13mb to 3mb.

    Thanks in advanced.
    Bryan

  2. #2
    Forum Contributor
    Join Date
    02-14-2007
    Location
    Chester, England
    MS-Off Ver
    2010 & 2016
    Posts
    312

    Re: VB code to auto save file as excel 2010

    Hi

    I might have missed the point here but just wondering if this helps..........

    If you change the fileformat from "xlNormal" to 51 it seems to save as xlsx.

    Hope this helps.

    Cheers

    James

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1