+ Reply to Thread
Results 1 to 14 of 14

Save file with date

  1. #1
    Forum Contributor
    Join Date
    07-25-2012
    Location
    Pakistan
    MS-Off Ver
    Excel 2010
    Posts
    178

    Save file with date

    Hi all

    Sory if any one mind it.....because my question is almost same.
    I want a button on top of sheet ...when i press it save as by date .....
    Save as on 25 Oct 2012 then file name should be 25Oct2012.xlsm

    REgards


    Linked thread - http://www.excelforum.com/excel-prog...s-by-date.html
    Last edited by arlu1201; 10-27-2012 at 04:24 AM.

  2. #2
    Forum Contributor
    Join Date
    10-18-2012
    Location
    Telford, England
    MS-Off Ver
    Excel 2010 (2003)
    Posts
    294

    Re: Save As by date

    In your button macro

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    07-25-2012
    Location
    Pakistan
    MS-Off Ver
    Excel 2010
    Posts
    178

    Re: Save As by date

    Thanks alot brynbaker

    I want the main file which name let say complain.xlsm remain in same place with original name, while copy of it create each time after pressing button.
    Moreover complete right the Macro as i am weak in VBA, I will be grate full to you.

    Regards

  4. #4
    Forum Contributor
    Join Date
    10-18-2012
    Location
    Telford, England
    MS-Off Ver
    Excel 2010 (2003)
    Posts
    294

    Re: Save As by date

    OK
    Add a module.
    Insert this code
    Please Login or Register  to view this content.
    In your workbook insert a button (form type not OLE) and associate it with macro saver in its context 9right click) menu.
    Done.
    end sub

  5. #5
    Forum Contributor
    Join Date
    07-25-2012
    Location
    Pakistan
    MS-Off Ver
    Excel 2010
    Posts
    178

    Re: Save file with date

    still confuse.....more elaboration...sory for inconvenience.

    Regards

  6. #6
    Forum Contributor
    Join Date
    10-18-2012
    Location
    Telford, England
    MS-Off Ver
    Excel 2010 (2003)
    Posts
    294

    Re: Save file with date

    Have you added the button yet? If not do so. Then post the file and I'll see about adding the macro for you.

  7. #7
    Forum Contributor
    Join Date
    07-25-2012
    Location
    Pakistan
    MS-Off Ver
    Excel 2010
    Posts
    178

    Re: Save file with date

    Thanks Alot brynbaker
    First of all sorry for late reply actually my home Office was corrupted and i want to do this experiment in home.

    Any way i did in office and its works fine.
    Slight change required if u please consider.

    1. Can i save it on Custom folder different folder or drive from original file?
    2. When i save file the original file closed i want original file remain open.
    3. I want to save file three four time in a day with time Ex:153001Nov2012.xlsm (1530time 01Nov2012 date)

    Regards and thanks again

  8. #8
    Forum Contributor
    Join Date
    10-18-2012
    Location
    Telford, England
    MS-Off Ver
    Excel 2010 (2003)
    Posts
    294

    Re: Save file with date

    My office Office crashed yesterday and needed reinstall to fix spurious 'Code execution was interupted' messages. Even with centraldistribution tools atht make it easy it took hours.
    1. Yes, easy if it's fixed, else but I'll provide for you to specify each time
    2. OK, see new code. Windows does save as so original must be reopened.
    3. OK, see new code for 153001Nov2012.xlsm format

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    07-25-2012
    Location
    Pakistan
    MS-Off Ver
    Excel 2010
    Posts
    178

    Re: Save file with date

    thanks alot brynbaker

    its work but may be i unable to define that i dont want it always ask me to where to save, once i define it then it never ask where to save, moreover it auto understand whats time and date and save it.
    Like if save it now then it save in E:\MIS Secretariate Data and file name should be 090002Nov2012.xlsm

    May be i elaborate myself

    REgards

  10. #10
    Forum Contributor
    Join Date
    10-18-2012
    Location
    Telford, England
    MS-Off Ver
    Excel 2010 (2003)
    Posts
    294

    Re: Save file with date

    Easy!
    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    07-25-2012
    Location
    Pakistan
    MS-Off Ver
    Excel 2010
    Posts
    178

    Re: Save file with date

    with due respect

    its not save by time and date.......and original file closed...
    Thanks in advance.

    REgards

  12. #12
    Forum Contributor
    Join Date
    10-18-2012
    Location
    Telford, England
    MS-Off Ver
    Excel 2010 (2003)
    Posts
    294

    Re: Save file with date

    I'm losing the ability to type! One more try:
    Please Login or Register  to view this content.
    The macro must be in your personal macro file; if in the workbook itself, it stops at the penultimate line as the file closes, so cannot reopen.

    Thank you for your patience.

  13. #13
    Forum Contributor
    Join Date
    07-25-2012
    Location
    Pakistan
    MS-Off Ver
    Excel 2010
    Posts
    178

    Re: Save file with date

    Thanks brynbaker

    Now its not save neither original file open.

    simply recent code did nothing

    I hope u will consider it again

    Regards

  14. #14
    Forum Contributor
    Join Date
    10-18-2012
    Location
    Telford, England
    MS-Off Ver
    Excel 2010 (2003)
    Posts
    294

    Re: Save file with date

    Please run the macro step by step (locate it in VB editor, press F8 to step through each line, slowly enough to be sure they all run, especially the last one. Also try it with any other excel file but with the original file closed.

+ 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