Results 1 to 8 of 8

Save to PDF instead of .xlsm

Threaded View

  1. #1
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Save to PDF instead of .xlsm

    This code now saves to xlsm,how can I get it to save as PDF instead? Using office 2013


    Dim varFullName As Variant
        Dim strFileName As String
    
        Cancel = True
    
        strFileName = ThisWorkbook.Sheets("today").Range("c16").Value
    varFullName = Application.GetSaveAsFilename(InitialFileName:=strFileName, _
                                                    fileFilter:="Microsoft Excel Workbook (*.xlsm), *.xlsm")
    
        If varFullName <> Cancel And varFullName <> False Then
              On Error GoTo FileNotSaved
                  Application.EnableEvents = False
                      ThisWorkbook.SaveAs Filename:=varFullName
                  Application.EnableEvents = True
        End If
    Last edited by zplugger; 02-09-2015 at 09:04 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] VBA to Save .xlsm as .xls
    By sambo24 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-07-2014, 12:10 PM
  2. Replies: 2
    Last Post: 10-04-2013, 10:12 AM
  3. [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
  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. Auto Save as .xlsm
    By pirovaulter in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-01-2011, 08:01 PM

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