+ Reply to Thread
Results 1 to 3 of 3

Code to save as pdf and xlsm

  1. #1
    Banned User!
    Join Date
    03-06-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    295

    Code to save as pdf and xlsm

    I would like to edit this code below to also save as xlsm in the same folder:


    Sub Create_PDF()
    Dim NewFN As Variant
    NewFN = "U:\Old User Files\REPAIR STATION\RPO Invoices\Repair Orders\RPO#" & Range("J2").Value & ".pdf"
    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=NewFN, Quality:=xlQualityStandard, _
    IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
    NextInvoice
    End Sub


    ************************

    I appreciate any help thank you.

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,178

    Re: Code to save as pdf and xlsm

    activeworkbook.saveas NewFN & ".xls"

  3. #3
    Banned User!
    Join Date
    03-06-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    295

    Re: Code to save as pdf and xlsm

    Where do I put that? This is a macro enabled workbook. Does the saved file have to be xlsm?

+ 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: 2
    Last Post: 10-04-2013, 10:12 AM
  2. [SOLVED] Copy/Save As xlsm workbook to new xlsm workbook is not copying the code with it
    By Grinchy in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-02-2013, 09:30 AM
  3. Replies: 3
    Last Post: 05-21-2013, 08:22 AM
  4. Save file xls file as xlsm - macro won't run in xlsm workbook
    By captbluefin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-07-2012, 11:39 AM
  5. Save as .xlsx and not as .xlsm with VBA code
    By Blue_Wings in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-22-2010, 04:37 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