+ Reply to Thread
Results 1 to 5 of 5

Saving a worksheet with changing month and year

  1. #1
    Registered User
    Join Date
    07-11-2014
    Location
    Elm Grove, WI
    MS-Off Ver
    2010
    Posts
    3

    Saving a worksheet with changing month and year

    How do I save a worksheet in PDF format that includes a changeable month and year, for example: Filename:= "C:\Desktop\Name Jun 2014.pdf"
    Last edited by GroveMike600; 07-11-2014 at 04:11 PM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Saving a worksheet with changing month and year

    Use the following code in a macro


    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-11-2014
    Location
    Elm Grove, WI
    MS-Off Ver
    2010
    Posts
    3

    Re: Saving a worksheet with changing month and year

    Thanks, but I get a runtime error when I use the code you sent. Here's the code from my macro. I'd like to add the month and year after the word Report, and if it helps, I've got that info in a cell in the workbook in the format mmm yyyy. What I have, up to this point, works fine; it's just adding the date that's a problem.

    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
    "C:\Users\Flanigan Family\Desktop\EG Library Activity Report - .pdf", Quality _
    :=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
    OpenAfterPublish:=True

  4. #4
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Saving a worksheet with changing month and year

    Try this.. for date

    Please Login or Register  to view this content.

    Say thanks, click *

  5. #5
    Registered User
    Join Date
    07-11-2014
    Location
    Elm Grove, WI
    MS-Off Ver
    2010
    Posts
    3

    Re: Saving a worksheet with changing month and year

    That worked--thanks.

+ 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. Graphing dates by month/year with 2 bars per month/year
    By Ellpoyohlokoh in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 05-22-2014, 05:25 AM
  2. Replies: 3
    Last Post: 09-04-2013, 10:49 AM
  3. If Column A Month and Year = ColumnB Todays Month and Year then send email
    By HACCStaff in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-15-2013, 12:47 AM
  4. date changing into only month and year
    By excel5111987 in forum Excel General
    Replies: 1
    Last Post: 05-28-2011, 11:18 AM
  5. Replies: 1
    Last Post: 01-05-2006, 07:10 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