+ Reply to Thread
Results 1 to 4 of 4

Amend message box text to include current Month and Year

  1. #1
    Forum Contributor
    Join Date
    02-09-2004
    Location
    Cardiff - Wales - UK
    MS-Off Ver
    2013
    Posts
    475

    Question Amend message box text to include current Month and Year

    Hi,

    I’ve been kindly assisted in a previous post by (CK76 & Special-K) who kindly gave me the following code which appended the current month and year at the end of my file name when I save it i.e.

    Please Login or Register  to view this content.
    ActiveWorkbook.SaveAs Filename:=srcWB.Path & "\Response Document Stats (" & Format(Date, "mmmm yyyy") & ").xlsx", FileFormat:=51
    Please Login or Register  to view this content.



    Once saved the following message is displayed i.e.


    Please Login or Register  to view this content.
    MsgBox ("This Months ‘Response Document Stats' File Has Been Created And Save Successfully.")
    Please Login or Register  to view this content.


    Could anyone please advise me of the code I need to modify the message to also display the current month and year e.g.

    This Months ‘Response Document Stats (March 2018).xlxs’ File Has Been Created And Save Successfully.

    Any assistance would be greatly appreciated

    Many thanks in advance

    Regards

    Rob
    Rob

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,098

    Re: Amend message box text to include current Month and Year

    How about
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    02-09-2004
    Location
    Cardiff - Wales - UK
    MS-Off Ver
    2013
    Posts
    475

    Re: Amend message box text to include current Month and Year

    Fluff13,


    EXCELLENT, Exactly what I wanted !!

    Many thanks


    Regards


    Rob

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,098

    Re: Amend message box text to include current Month and Year

    Glad to help & thanks for the feedback

+ 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. [SOLVED] Amend code to add Month and Year to file name when saving
    By robertguy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-01-2018, 07:39 AM
  2. Replies: 1
    Last Post: 04-29-2016, 01:28 PM
  3. VBA code adjustment to include only current month and previous month automatically.
    By ElmerFud in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-05-2015, 03:02 PM
  4. [SOLVED] Set PivotTable Filter to Current Day, Current Week, Current Month, or Current Year
    By EnigmaMatter in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-30-2014, 08:31 AM
  5. [SOLVED] Adding Current month and year to VBA generated text box
    By akhileshgs in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-14-2014, 03:32 AM
  6. [SOLVED] Extract text from a string of text (amend formula to include new criteria)
    By robertguy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-10-2013, 04:53 PM
  7. Replies: 3
    Last Post: 09-04-2013, 10:49 AM

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