+ Reply to Thread
Results 1 to 13 of 13

How can I get a file to automatically save as xlNormal?

Hybrid View

  1. #1
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    How can I get a file to automatically save as xlNormal?

    I have a file in my XLSTART folder that I want to have available to Excel 2002.
    When I open Excel 2007 and modify the file, I want to save it as a .xls file so that it is available to 2002.

    Is there a convenient way to have 2007 automatically save it as an .xls file? I know I can write a BeforeSave macro to do a .SaveAs xlNormal, but I'm hoping that there is some setting somewhere that will do it automatically.

    EDIT: I just discovered that Excel appears to save a file in the same format that it was originally saved in. Sorry for wasting every one's time.
    Last edited by foxguy; 08-08-2010 at 10:42 PM.
    Foxguy

    Remember to mark your questions [Solved] and rate the answer(s)
    Forum Rules are Here

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How can I get a file to automatically save as xlNormal?

    you can change 2007 default file save as option.but that would apply to all workbooks
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: How can I get a file to automatically save as xlNormal?

    Hi martindwilson;

    Thanks, unfortunately that's not what I need. When I'm working in 2007, I want the file I'm working in to save as a 2007 file. I just don't want my macro file to be saved as 2007 file.

  4. #4
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: How can I get a file to automatically save as xlNormal?

    Private Sub Workbook_BeforeClose(Cancel As Boolean)
      ThisWorkbook.SaveAs ThisWorkbook.FullName
    End Sub
    or

    Private Sub Workbook_BeforeClose(Cancel As Boolean)
      ThisWorkbook.SaveAs ThisWorkbook.FullName, xlExcel8
    End Sub
    or
    Private Sub Workbook_BeforeClose(Cancel As Boolean)
      ThisWorkbook.SaveAsCopy ThisWorkbook.FullName, xlExcel8
    End Sub
    Last edited by snb; 08-08-2010 at 05:45 PM.

  5. #5
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,937

    Re: How can I get a file to automatically save as xlNormal?

    Under Excel Options,Advanced, General, there an option to open all file in:
    So maybe you can save your macro workbook in a separate folder and enter it there. If you indicate XLSTART it will open All files in that folder which may not be what you want.
    Ben Van Johnson

  6. #6
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: How can I get a file to automatically save as xlNormal?

    protonLeah;

    I want the macro file to be accessed by all instances of Excel whether 2002 or 2007. I just don't want to have it saved in a format that 2002 can't access.

    snb;

    I'm saving that as a last resort. I was hoping to avoid a macro to do it.
    I'm curious. Have you tried this? Wouldn't the "SaveAs" method crash because the filename already exists? I assumed that I would have to SaveAs a filename in a different folder then another SaveAs to put it back into XLSTART.

  7. #7
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: How can I get a file to automatically save as xlNormal?

    I added the SaveAsCopy option.

  8. #8
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,980

    Re: How can I get a file to automatically save as xlNormal?

    I'm confused. If you have an .xls file, then just save it. If you have an xlsx or xlsm or xlsb, then you need saveas, but since the file name will not be the same (it will be an .xls) your question seems to be moot?
    Everyone who confuses correlation and causation ends up dead.

  9. #9
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: How can I get a file to automatically save as xlNormal?

    romperstomper;

    I was under the impression that Excel would try to save a file in the default format for the Excel version you're working in. I admit I didn't try it before I asked the question. Now I tried it, and it does appear that Excel saves it in the format that it was originally saved.

    I learn something new every day.

    Another pointless question.

  10. #10
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,980

    Re: How can I get a file to automatically save as xlNormal?

    If you SaveAs, then yes. If you just Save, then it saves in whatever format it was originally. Otherwise I think we'd all have gone mad! (or madder, in my case)
    Oh, and if you learn something, then it's not a pointless question.
    Last edited by romperstomper; 08-08-2010 at 06:45 PM.

  11. #11
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: How can I get a file to automatically save as xlNormal?

    Pointless was a bad choice of words.

+ 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