+ Reply to Thread
Results 1 to 6 of 6

macro to 'save as pdf' that prompts for filename, location AND only prints specified range

  1. #1
    Registered User
    Join Date
    04-30-2013
    Location
    usa
    MS-Off Ver
    Excel 2010
    Posts
    6

    macro to 'save as pdf' that prompts for filename, location AND only prints specified range

    Warning....total newbie here. I have a multiple sheet workbook that I need to have just the active sheet 'save as' a PDF but it needs to prompt the user for the filename, location AND only 'print' a specified dynamic range. I currently have a similar macro that prompts the user for a printer...which works correctly. The simple solution is to add 'cutepdf' to my printer list, but this is not ideal with the number of folks in the office that would be using this sheet.

    I have combined a few macros and unfortunately I can't get this one to work properly. Currently, it prints the entire sheet instead of the specified range AND it saves it to My Documents AND names it the name of the excel sheet with a PDF extension.

    Please Login or Register  to view this content.
    Thanks in advance for any advise
    Missy
    Last edited by mtcolombo; 05-06-2013 at 01:52 PM.

  2. #2
    Registered User
    Join Date
    05-17-2012
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: macro to 'save as pdf' that prompts for filename, location AND only prints specified r

    I put this together pretty fast --- I used a formula on the far left to decide to show or hide the row - Then wrote the macro only show the desired rows and to save as a PDF to the Desktop... Not sure if this is the solution you were looking for, but pretty user friendly with a ton of different applications. Check it out and let me know what you think.

    If you want to use to make it 'Print ready'... You could write a macro and add it to this before the "Call PDF"...

    Sub FINALMACRO()
    Application.ScreenUpdating = False

    Call UNHIDE
    Call SEARCH
    Call PDF

    End Sub


    Hope it helpss
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    04-30-2013
    Location
    usa
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: macro to 'save as pdf' that prompts for filename, location AND only prints specified r

    I do like this option for hiding/unhiding, but I prefer that the user doesn't have to reset/implement the hiding. The goal is for the user to just press the designated button and have it save to PDF. Also, this doesn't prompt the user for a filename or file location.

    For some reason (could it be due to the order of events,) the saved PDF that my macro creates prints the entire sheet instead of the range. I think that is my biggest beef with the macro I have...my wish list would then be to concentrate on having the user be able to name and save it to where ever they desire.

    Thanks for giving it a go tho...your method of filtering is pretty cool.

  4. #4
    Registered User
    Join Date
    05-17-2012
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: macro to 'save as pdf' that prompts for filename, location AND only prints specified r

    Gotcha - I've got a bunch of stuff to work at the moments, but I'll try to get back to you later this afternoon.

  5. #5
    Registered User
    Join Date
    05-17-2012
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: macro to 'save as pdf' that prompts for filename, location AND only prints specified r

    Ok --- This should do it...

    Just added a Save as message box (which updates cell A1) --- I call all the macros, and then rerun the "Unhide" so that the file doesnt need resetting...

    Let me know if it helps,


    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    04-30-2013
    Location
    usa
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: macro to 'save as pdf' that prompts for filename, location AND only prints specified r

    Thanks for your help! Looking at this allowed me to integrate it into the code I had already written. Thanks again for your time. It is greatly appreciated!

    M

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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