+ Reply to Thread
Results 1 to 4 of 4

Button that Save As file by Date

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    07-25-2012
    Location
    Pakistan
    MS-Off Ver
    Office 365 for MAC
    Posts
    191

    Button that Save As file by Date

    Hi All VBA Groos

    I have a sheet which continuously update i want every day i Save As file with Today's Date. and this will done via Button top on the sheet

    For Example when i click the button it Save as 25Oct2012.xlsm

    and original file remain same and same place.

    Regards

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Button that Save As file by Date

    Hi, waqarqrl,

    whatīs wrong with the answer your received here? Please do not start a new thread but update information in that thread on whatīs working or what you are missing and explain what kind of trouble you ran into.

    What kind of button: ActiveX or Formular? If Formular insert a standard module and copy this code there:
    Sub waqarqrl_saveDate()
    With ActiveWorkbook
      .SaveCopyAs ActiveWorkbook.Path & Application.PathSeparator & Format(Date, "DDMMMYYYY") & ".xlsm"
    End With
    End Sub
    Then insert the button via Developer Tab and assign the macro to it.

    If ActiveX:
    Insert the Button, double-click on the button and add the following code in between the lines of the procedure:
    With ActiveWorkbook
      .SaveCopyAs ActiveWorkbook.Path & Application.PathSeparator & Format(Date, "DDMMMYYYY") & ".xlsm"
    End With
    Please mind that you need to leave the Developer Mode to get the ActiveX-button to work.

    The codes above will leave you in your original workbook and save a copy in the same folder with the Date requested (at least on my system with Excel2010 and xlsm as standard file format).

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Forum Contributor
    Join Date
    07-25-2012
    Location
    Pakistan
    MS-Off Ver
    Office 365 for MAC
    Posts
    191

    Re: Button that Save As file by Date

    some one i think modarator delete my question. when i click here i go there.... i dont understand what happen.


    Any way thanks for reponse. would u more elaborate ?

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Button that Save As file by Date

    Hi, waqarqrl,

    would u more elaborate ?
    What part? The Developer Tab isnīt visible on default, it needs to be made visible by going to Option/Menu (sorry, only have a german version of Office available).

    Quote Originally Posted by Forum Rules
    Ensure your question is not too vague.
    Thatīs the point - maybe I could answer your question if I could only understand what you are asking

    Ciao,
    Holger

+ 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