+ Reply to Thread
Results 1 to 12 of 12

Saving Excel file without Opening (from windows)

  1. #1
    Registered User
    Join Date
    08-07-2013
    Location
    Cardiff
    MS-Off Ver
    Office 365
    Posts
    86

    Saving Excel file without Opening (from windows)

    Sorry if this is in the wrong place...

    No idea if this is even possible, but is there a way I can just save an Excel workbook without opening - in order to save as current date/time?

    I already have multiple Macros that Open files, refresh reports, save, put in a given location etc etc.
    But occasionally I want to send a report to a customer that may have been created a few days ago (and I don't want them to know that it's been ready for a few days). I usually just open it, and save and close.

    it would be really useful if I could somehow just save it without opening.

    Any ideas if this is possible?
    Thanks

  2. #2
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Saving Excel file without Opening (from windows)

    The easiest (and safest) way to do this is by opening and closing a file (rather than by fiddling with file attributes)

    Try this:
    - save the atttached file to the Desktop
    - double click on it to open the file
    - browse to your chosen file
    - click open
    - file is then Opened, Saved & Closed
    - attached file is also closed

    When you first open the file:
    - {ALT} {F11} get's you into VBA area
    - double click on ThisWorkbook in left panel
    - the module with code below should open up
    - modify the folder from C:\TestArea\ (remember the trailing "\")
    - after modifying the path, remove the apostrophe that I have placed in front of OpenAndSaveAFile
    (which currently prevents it from running to allow you to change the path)
    - then save the file and double click on it to open it again

    In ThisWorkbook module:

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by kev_; 09-22-2017 at 07:21 AM.
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,360

    Re: Saving Excel file without Opening (from windows)

    Why don't you just rename it in Windows Explorer?
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    08-07-2013
    Location
    Cardiff
    MS-Off Ver
    Office 365
    Posts
    86

    Re: Saving Excel file without Opening (from windows)

    Thanks Kev

    I have something similar, which I use when I need it for a folder which contains a load of files. But I'm looking for a more 'quick and dirty' approach, where I can just action on the odd file here and there directly from windows.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,360

    Re: Saving Excel file without Opening (from windows)

    But I'm looking for a more 'quick and dirty' approach, where I can just action on the odd file here and there directly from windows.
    See Post #3

  6. #6
    Registered User
    Join Date
    08-07-2013
    Location
    Cardiff
    MS-Off Ver
    Office 365
    Posts
    86

    Re: Saving Excel file without Opening (from windows)

    Quote Originally Posted by TMS View Post
    Why don't you just rename it in Windows Explorer?
    Thanks. But this doesn't seem to save, just re-names. Ie, the 'Data modified' and 'Date last saved' attribute stays the same.

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,360

    Re: Saving Excel file without Opening (from windows)


  8. #8
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Saving Excel file without Opening (from windows)

    You cannot be dealing with a huge number of files, so this should work for you

    Why not save the files into nominated folders and then
    - when the PC boots up every morning auto-Open Excel file that contains a macro to open, save and close all the files in those nominated folders
    (you say that "I have something similar, which I use when I need it for a folder which contains a load of files")

    Painless - everything dated to today's date without any user involvement

  9. #9
    Registered User
    Join Date
    08-07-2013
    Location
    Cardiff
    MS-Off Ver
    Office 365
    Posts
    86

    Re: Saving Excel file without Opening (from windows)

    Thanks Kev, TMS...

    I think there are a few ways around it, but that they are perhaps over-complicating it a bit.
    For these where its just the odd file, I can just open, save, close in a few keystrokes I guess. I was just being lazy, and hoped there was a magic windows explorer shortcut button to do it!


    Thanks anyway!

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,360

    Re: Saving Excel file without Opening (from windows)

    You're welcome.


    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

  11. #11
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Saving Excel file without Opening (from windows)

    Thanks for the rep

  12. #12
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,360

    Re: Saving Excel file without Opening (from windows)

    Ditto. Thanks for the rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 03-14-2016, 12:41 PM
  2. [SOLVED] two windows opening whenever I open an excel file
    By Stebobibo in forum Excel General
    Replies: 4
    Last Post: 02-23-2015, 05:49 PM
  3. Opening Excel File Crashes. Last opened in 2 windows. 2013
    By bowbalitic in forum Excel General
    Replies: 0
    Last Post: 10-03-2014, 12:08 AM
  4. Saving/opening excel 2013 with multiple windows
    By tmb7631 in forum Excel General
    Replies: 2
    Last Post: 08-07-2013, 02:48 PM
  5. Replies: 0
    Last Post: 08-03-2009, 01:11 PM
  6. Replies: 4
    Last Post: 07-18-2007, 12:14 PM
  7. Opening then saving a CSV file looses Commas in Excel 2003
    By Sean Wolfe in forum Excel General
    Replies: 5
    Last Post: 04-22-2005, 09:08 PM

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